From ad5784364df14b4e4895d4810ec1b8dc0acd4947 Mon Sep 17 00:00:00 2001 From: Marco Date: Sun, 30 Jul 2017 14:16:52 +0200 Subject: [PATCH] Return confirmed email address from 'confirmEmail' in class 'Auth' --- src/Auth.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Auth.php b/src/Auth.php index 5dfd8f2..6debe62 100644 --- a/src/Auth.php +++ b/src/Auth.php @@ -471,6 +471,7 @@ final class Auth extends UserManager { * * @param string $selector the selector from the selector/token pair * @param string $token the token from the selector/token pair + * @return string the email address that has successfully been verified * @throws InvalidSelectorTokenPairException if either the selector or the token was not correct * @throws TokenExpiredException if the token has already expired * @throws AuthError if an internal problem occurred (do *not* catch) @@ -512,6 +513,8 @@ final class Auth extends UserManager { catch (Error $e) { throw new DatabaseError(); } + + return $confirmationData['email']; } else { throw new TokenExpiredException();