Files left out of merge

This commit is contained in:
Lorenzo Milesi
2022-08-12 09:47:02 +02:00
parent 2face44d98
commit 34981c8d4f
2 changed files with 19 additions and 21 deletions

View File

@ -461,8 +461,7 @@ class SettingsController extends Controller
throw new NotFoundHttpException(); throw new NotFoundHttpException();
} }
switch($choice) switch ($choice) {
{
case 'google-authenticator': case 'google-authenticator':
$uri = $this->make(TwoFactorQrCodeUriGeneratorService::class, [$user])->run(); $uri = $this->make(TwoFactorQrCodeUriGeneratorService::class, [$user])->run();
return $this->renderAjax('two-factor', ['id' => $id, 'uri' => $uri]); return $this->renderAjax('two-factor', ['id' => $id, 'uri' => $uri]);
@ -475,7 +474,6 @@ class SettingsController extends Controller
$smsCode = $this->make(TwoFactorSmsCodeGeneratorService::class, [$user])->run(); $smsCode = $this->make(TwoFactorSmsCodeGeneratorService::class, [$user])->run();
return $this->renderAjax('two-factor-sms', ['id' => $id, 'code' => $smsCode, 'mobilePhone' => $mobilePhone]); return $this->renderAjax('two-factor-sms', ['id' => $id, 'code' => $smsCode, 'mobilePhone' => $mobilePhone]);
} }
} }
public function actionTwoFactorEnable($id) public function actionTwoFactorEnable($id)

View File

@ -67,8 +67,8 @@ class User extends ActiveRecord implements IdentityInterface
use ContainerAwareTrait; use ContainerAwareTrait;
// following constants are used on secured email changing process // following constants are used on secured email changing process
const OLD_EMAIL_CONFIRMED = 0b01; public const OLD_EMAIL_CONFIRMED = 0b01;
const NEW_EMAIL_CONFIRMED = 0b10; public const NEW_EMAIL_CONFIRMED = 0b10;
/** /**
* @var string Plain password. Used for model validation * @var string Plain password. Used for model validation