fix conflicts
This commit is contained in:
parent
ddb73eb4f6
commit
f07f246f8d
4 changed files with 20 additions and 1 deletions
|
@ -239,6 +239,15 @@ return [
|
||||||
'name' => Exception::USER_OAUTH2_PROVIDER_ERROR,
|
'name' => Exception::USER_OAUTH2_PROVIDER_ERROR,
|
||||||
'description' => 'OAuth2 provider returned some error.',
|
'description' => 'OAuth2 provider returned some error.',
|
||||||
'code' => 424,
|
'code' => 424,
|
||||||
|
Exception::USER_EMAIL_ALREADY_VERIFIED => [
|
||||||
|
'name' => Exception::USER_EMAIL_ALREADY_VERIFIED,
|
||||||
|
'description' => 'User email is already verified',
|
||||||
|
'code' => 400,
|
||||||
|
],
|
||||||
|
Exception::USER_PHONE_ALREADY_VERIFIED => [
|
||||||
|
'name' => Exception::USER_PHONE_ALREADY_VERIFIED,
|
||||||
|
'description' => 'User phone is already verified',
|
||||||
|
'code' => 400
|
||||||
],
|
],
|
||||||
|
|
||||||
/** Teams */
|
/** Teams */
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9b4bcb8140484669421685b4ba89fa1c4d331360
|
Subproject commit 88b6d59051992ed86183ee83d77bf678d1cb73bf
|
|
@ -2670,6 +2670,10 @@ App::post('/v1/account/verification')
|
||||||
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP Disabled');
|
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP Disabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($user->getAttribute('emailVerification') == true){
|
||||||
|
throw new Exception(Exception::USER_EMAIL_ALREADY_VERIFIED);
|
||||||
|
}
|
||||||
|
|
||||||
$roles = Authorization::getRoles();
|
$roles = Authorization::getRoles();
|
||||||
$isPrivilegedUser = Auth::isPrivilegedUser($roles);
|
$isPrivilegedUser = Auth::isPrivilegedUser($roles);
|
||||||
$isAppUser = Auth::isAppUser($roles);
|
$isAppUser = Auth::isAppUser($roles);
|
||||||
|
@ -2895,6 +2899,10 @@ App::post('/v1/account/verification/phone')
|
||||||
throw new Exception(Exception::USER_PHONE_NOT_FOUND);
|
throw new Exception(Exception::USER_PHONE_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($user->getAttribute('phoneVerification') == true){
|
||||||
|
throw new Exception(Exception::USER_PHONE_ALREADY_VERIFIED);
|
||||||
|
}
|
||||||
|
|
||||||
$roles = Authorization::getRoles();
|
$roles = Authorization::getRoles();
|
||||||
$isPrivilegedUser = Auth::isPrivilegedUser($roles);
|
$isPrivilegedUser = Auth::isPrivilegedUser($roles);
|
||||||
$isAppUser = Auth::isAppUser($roles);
|
$isAppUser = Auth::isAppUser($roles);
|
||||||
|
|
|
@ -84,6 +84,8 @@ class Exception extends \Exception
|
||||||
public const USER_OAUTH2_BAD_REQUEST = 'user_oauth2_bad_request';
|
public const USER_OAUTH2_BAD_REQUEST = 'user_oauth2_bad_request';
|
||||||
public const USER_OAUTH2_UNAUTHORIZED = 'user_oauth2_unauthorized';
|
public const USER_OAUTH2_UNAUTHORIZED = 'user_oauth2_unauthorized';
|
||||||
public const USER_OAUTH2_PROVIDER_ERROR = 'user_oauth2_provider_error';
|
public const USER_OAUTH2_PROVIDER_ERROR = 'user_oauth2_provider_error';
|
||||||
|
public const USER_EMAIL_ALREADY_VERIFIED = 'user_email_alread_verified';
|
||||||
|
public const USER_PHONE_ALREADY_VERIFIED = 'user_phone_already_verified';
|
||||||
|
|
||||||
/** Teams */
|
/** Teams */
|
||||||
public const TEAM_NOT_FOUND = 'team_not_found';
|
public const TEAM_NOT_FOUND = 'team_not_found';
|
||||||
|
|
Loading…
Reference in a new issue