mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-07-11 03:26:20 +02:00
Refactor array definition in 'authenticateUserInternal'
This commit is contained in:
@ -613,6 +613,8 @@ final class Auth extends UserManager {
|
||||
* @throws AuthError if an internal problem occurred (do *not* catch)
|
||||
*/
|
||||
private function authenticateUserInternal($password, $email = null, $username = null, $rememberDuration = null) {
|
||||
$columnsToFetch = [ 'id', 'email', 'password', 'verified', 'username', 'status' ];
|
||||
|
||||
if ($email !== null) {
|
||||
$email = self::validateEmailAddress($email);
|
||||
|
||||
@ -620,7 +622,7 @@ final class Auth extends UserManager {
|
||||
try {
|
||||
$userData = $this->getUserDataByEmailAddress(
|
||||
$email,
|
||||
[ 'id', 'email', 'password', 'verified', 'username', 'status' ]
|
||||
$columnsToFetch
|
||||
);
|
||||
}
|
||||
// if there is no user with the specified email address
|
||||
@ -640,7 +642,7 @@ final class Auth extends UserManager {
|
||||
try {
|
||||
$userData = $this->getUserDataByUsername(
|
||||
$username,
|
||||
[ 'id', 'email', 'password', 'verified', 'username', 'status' ]
|
||||
$columnsToFetch
|
||||
);
|
||||
}
|
||||
// if there is no user with the specified username
|
||||
|
Reference in New Issue
Block a user