From 9182e8f6a37098ff220cfe75cb27f4097783b936 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 8 May 2024 11:23:42 +0100 Subject: [PATCH] chore: cleanup --- app/controllers/api/account.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index b60ce6a04f..96fed2d79d 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -1291,7 +1291,7 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') throw new Exception(Exception::USER_UNAUTHORIZED, 'OAuth provider failed to return email.'); } - $isVerified = $oauth2->isEmailVerified($accessToken); + $isEmailVerified = $oauth2->isEmailVerified($accessToken); $userWithEmail = $dbForProject->findOne('users', [ Query::equal('email', [$email]), @@ -1341,8 +1341,8 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect') Permission::delete(Role::user($userId)), ], 'email' => $email, - 'emailVerification' => $isVerified, - 'status' => true, // Email should already be authenticated by OAuth2 provider + 'emailVerification' => $isEmailVerified, + 'status' => true, 'password' => null, 'hash' => Auth::DEFAULT_ALGO, 'hashOptions' => Auth::DEFAULT_ALGO_OPTIONS,