mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-03 14:47:30 +02:00
Return confirmed email address from 'confirmEmail' in class 'Auth'
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user