1
0
Fork 0
mirror of synced 2024-06-28 19:20:25 +12:00

linter fix

This commit is contained in:
Matej Bačo 2023-05-01 17:51:31 +02:00
parent 73668a7283
commit 6885e6ea0e
2 changed files with 3 additions and 3 deletions

View file

@ -566,7 +566,7 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
$name = $oauth2->getUserName($accessToken);
$email = $oauth2->getUserEmail($accessToken);
if(empty($email)) {
if (empty($email)) {
throw new Exception(Exception::USER_UNAUTHORIZED, 'OAuth provider failed to return email.');
}

View file

@ -197,10 +197,10 @@ class Github extends OAuth2
}
}
if(!empty($primaryEmail)) {
if (!empty($primaryEmail)) {
$this->user['email'] = $primaryEmail['email'];
$this->user['verified'] = $primaryEmail['verified'];
} else if(!empty($verifiedEmail)) {
} elseif (!empty($verifiedEmail)) {
$this->user['email'] = $verifiedEmail['email'];
$this->user['verified'] = $verifiedEmail['verified'];
}