fix conflicts
This commit is contained in:
parent
ddb73eb4f6
commit
f07f246f8d
|
@ -239,6 +239,15 @@ return [
|
|||
'name' => Exception::USER_OAUTH2_PROVIDER_ERROR,
|
||||
'description' => 'OAuth2 provider returned some error.',
|
||||
'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 */
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 9b4bcb8140484669421685b4ba89fa1c4d331360
|
||||
Subproject commit 88b6d59051992ed86183ee83d77bf678d1cb73bf
|
|
@ -2669,6 +2669,10 @@ App::post('/v1/account/verification')
|
|||
if (empty(App::getEnv('_APP_SMTP_HOST'))) {
|
||||
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();
|
||||
$isPrivilegedUser = Auth::isPrivilegedUser($roles);
|
||||
|
@ -2894,6 +2898,10 @@ App::post('/v1/account/verification/phone')
|
|||
if (empty($user->getAttribute('phone'))) {
|
||||
throw new Exception(Exception::USER_PHONE_NOT_FOUND);
|
||||
}
|
||||
|
||||
if($user->getAttribute('phoneVerification') == true){
|
||||
throw new Exception(Exception::USER_PHONE_ALREADY_VERIFIED);
|
||||
}
|
||||
|
||||
$roles = Authorization::getRoles();
|
||||
$isPrivilegedUser = Auth::isPrivilegedUser($roles);
|
||||
|
|
|
@ -84,6 +84,8 @@ class Exception extends \Exception
|
|||
public const USER_OAUTH2_BAD_REQUEST = 'user_oauth2_bad_request';
|
||||
public const USER_OAUTH2_UNAUTHORIZED = 'user_oauth2_unauthorized';
|
||||
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 */
|
||||
public const TEAM_NOT_FOUND = 'team_not_found';
|
||||
|
|
Loading…
Reference in a new issue