From 97a2de2f48995260e31a24125cbb5319f79c95f4 Mon Sep 17 00:00:00 2001 From: Antonio Cordeddu Date: Tue, 9 Aug 2022 12:21:34 +0200 Subject: [PATCH] PR #458 - fix and improvement required by @mp1509 --- composer.json | 3 + docs/installation/configuration-options.md | 22 ++--- src/User/Bootstrap.php | 20 +++-- src/User/Controller/SettingsController.php | 2 +- src/User/Form/LoginForm.php | 2 +- .../TwoFactorEmailCodeGeneratorService.php | 14 ++-- .../TwoFactorSmsCodeGeneratorService.php | 22 +++-- .../Validator/TwoFactorEmailValidator.php | 4 +- .../TwoFactorTextMessageValidator.php | 4 +- src/User/resources/i18n/ca/usuario.php | 7 ++ src/User/resources/i18n/da/usuario.php | 7 ++ src/User/resources/i18n/de-DU/usuario.php | 7 ++ src/User/resources/i18n/de/usuario.php | 7 ++ src/User/resources/i18n/es/usuario.php | 7 ++ src/User/resources/i18n/et/usuario.php | 7 ++ src/User/resources/i18n/fa-IR/usuario.php | 7 ++ src/User/resources/i18n/fi/usuario.php | 7 ++ src/User/resources/i18n/fr/usuario.php | 7 ++ src/User/resources/i18n/hr/usuario.php | 7 ++ src/User/resources/i18n/hu/usuario.php | 7 ++ src/User/resources/i18n/it/usuario.php | 8 +- src/User/resources/i18n/kk/usuario.php | 7 ++ src/User/resources/i18n/lt/usuario.php | 7 ++ src/User/resources/i18n/nl/usuario.php | 7 ++ src/User/resources/i18n/pl/usuario.php | 7 ++ src/User/resources/i18n/pt-BR/usuario.php | 7 ++ src/User/resources/i18n/pt-PT/usuario.php | 7 ++ src/User/resources/i18n/ro/usuario.php | 7 ++ src/User/resources/i18n/ru/usuario.php | 7 ++ src/User/resources/i18n/th/usuario.php | 7 ++ src/User/resources/i18n/tr-TR/usuario.php | 7 ++ src/User/resources/i18n/uk/usuario.php | 7 ++ src/User/resources/i18n/vi/usuario.php | 7 ++ src/User/resources/i18n/zh-CN/usuario.php | 7 ++ src/User/resources/views/settings/account.php | 80 +++++++++++++------ 35 files changed, 287 insertions(+), 62 deletions(-) diff --git a/composer.json b/composer.json index d7f1639..204a5f1 100644 --- a/composer.json +++ b/composer.json @@ -80,6 +80,9 @@ }, "fxp-asset": { "enabled": false + }, + "allow-plugins": { + "yiisoft/yii2-composer": true } }, "conflict": { diff --git a/docs/installation/configuration-options.md b/docs/installation/configuration-options.md index 29c6a3a..689f42b 100644 --- a/docs/installation/configuration-options.md +++ b/docs/installation/configuration-options.md @@ -15,31 +15,35 @@ a bigger period so to avoid out of sync issues. #### twoFactorAuthenticationValidators (type: `array`) An array of arrays of channels availables for two factor authentication. The keys in the arrays have the following meaning: -class: it will be the validator class with namespace -name: the name that will be displayed in the section to the user -configurationUrl: the url to the action that will dispaly the configuration form for the validator -codeDurationTime: time duration of the code in session in seconds (not applicable for Google authenticator) -smsSender: the reference to SmsSenderInterface for managing SMS send. +class: it will be the validator class with namespace; +name: the name that will be displayed in the section to the user; +configurationUrl: the url to the action that will dispaly the configuration form for the validator; +codeDurationTime: time duration of the code in session in seconds (not applicable for Google authenticator); +smsSender: the reference to SmsSenderInterface for managing SMS send; +enabled: true if you want to enable the channel, false otherwise. -The following is the deafult configuration: +The following is the default configuration: 'google-authenticator'=>[ 'class'=>\Da\User\Validator\TwoFactorCodeValidator::class, 'description'=>Yii::t('usuario', 'Google Authenticator'), - 'configurationUrl'=>'user/settings/two-factor' + 'configurationUrl'=>'user/settings/two-factor', + 'enabled'=>true ], 'email'=>[ 'class'=>\Da\User\Validator\TwoFactorEmailValidator::class, 'description'=>Yii::t('usuario', 'Email'), 'configurationUrl'=>'user/settings/two-factor-email', - 'codeDurationTime'=>300 + 'codeDurationTime'=>300, + 'enabled'=>true ], 'sms'=>[ 'class'=>\Da\User\Validator\TwoFactorTextMessageValidator::class, 'description'=>Yii::t('usuario', 'Text message'), 'configurationUrl'=>'user/settings/two-factor-sms', 'codeDurationTime'=>300, - 'smsSender'=>'smsSender' + 'smsSender'=>'smsSender', + 'enabled'=>true ] For instructions about implementation of SMS sending see at the following link: https://www.yiiframework.com/extension/yetopen/yii2-sms-aruba diff --git a/src/User/Bootstrap.php b/src/User/Bootstrap.php index 22e0a04..9f5bd3a 100644 --- a/src/User/Bootstrap.php +++ b/src/User/Bootstrap.php @@ -27,6 +27,7 @@ use yii\base\InvalidConfigException; use yii\console\Application as ConsoleApplication; use yii\i18n\PhpMessageSource; use yii\web\Application as WebApplication; +use yii\helpers\ArrayHelper; /** * Bootstrap class of the yii2-usuario extension. Configures container services, initializes translations, @@ -163,19 +164,21 @@ class Bootstrap implements BootstrapInterface } // Initialize array of two factor authentication validators available - if(is_null(Yii::$app->getModule('user')->twoFactorAuthenticationValidators)){ - Yii::$app->getModule('user')->twoFactorAuthenticationValidators=[ + $defaultTwoFactorAuthenticationValidators = + [ 'google-authenticator'=>[ 'class'=>\Da\User\Validator\TwoFactorCodeValidator::class, 'description'=>Yii::t('usuario', 'Google Authenticator'), - 'configurationUrl'=>'user/settings/two-factor' + 'configurationUrl'=>'user/settings/two-factor', + 'enabled'=>true ], 'email'=>[ 'class'=>\Da\User\Validator\TwoFactorEmailValidator::class, 'description'=>Yii::t('usuario', 'Email'), 'configurationUrl'=>'user/settings/two-factor-email', // Time duration of the code in seconds - 'codeDurationTime'=>300 + 'codeDurationTime'=>300, + 'enabled'=>true ], 'sms'=>[ 'class'=>\Da\User\Validator\TwoFactorTextMessageValidator::class, @@ -184,13 +187,14 @@ class Bootstrap implements BootstrapInterface // component for sending sms 'smsSender'=>'smsSender', // Time duration of the code in seconds - 'codeDurationTime'=>300 + 'codeDurationTime'=>300, + 'enabled'=>true ] ]; - } - - + $app->getModule('user')->twoFactorAuthenticationValidators = + ArrayHelper::merge($app->getModule('user')->twoFactorAuthenticationValidators, $defaultTwoFactorAuthenticationValidators); + if ($app instanceof WebApplication) { diff --git a/src/User/Controller/SettingsController.php b/src/User/Controller/SettingsController.php index baccb1b..95aee85 100644 --- a/src/User/Controller/SettingsController.php +++ b/src/User/Controller/SettingsController.php @@ -449,7 +449,7 @@ class SettingsController extends Controller $module = Yii::$app->getModule('user'); $validators = $module->twoFactorAuthenticationValidators; $choice = Yii::$app->request->get('choice'); - $codeDurationTime = ArrayHelper::getValue($validators,$choice.'.codeDurationTime', 0); + $codeDurationTime = ArrayHelper::getValue($validators,$choice.'.codeDurationTime', 300); $class = ArrayHelper::getValue($validators,$choice.'.class'); $object = $this diff --git a/src/User/Form/LoginForm.php b/src/User/Form/LoginForm.php index c3bbf7f..c1cd3f7 100644 --- a/src/User/Form/LoginForm.php +++ b/src/User/Form/LoginForm.php @@ -120,7 +120,7 @@ class LoginForm extends Model $validators = $module->twoFactorAuthenticationValidators; $type = $this->user->auth_tf_type; $class = ArrayHelper::getValue($validators,$type.'.class'); - $codeDurationTime = ArrayHelper::getValue($validators,$type.'.codeDurationTime', 0); + $codeDurationTime = ArrayHelper::getValue($validators,$type.'.codeDurationTime', 300); $validator = $this ->make($class, [$this->user, $this->twoFactorAuthenticationCode, $this->module->twoFactorAuthenticationCycles]); $success = $validator->validate(); diff --git a/src/User/Service/TwoFactorEmailCodeGeneratorService.php b/src/User/Service/TwoFactorEmailCodeGeneratorService.php index d946e2a..cb15c88 100644 --- a/src/User/Service/TwoFactorEmailCodeGeneratorService.php +++ b/src/User/Service/TwoFactorEmailCodeGeneratorService.php @@ -50,12 +50,14 @@ class TwoFactorEmailCodeGeneratorService implements ServiceInterface $code = str_pad($code, 6, 0, STR_PAD_LEFT); // send email $mailService = MailFactory::makeTwoFactorCodeMailerService($user, $code); - $mailService->run(); - - // put key in session - Yii::$app->session->set("email_code_time", date('Y-m-d H:i:s')); - Yii::$app->session->set("email_code", $code); - + // check the sending emailYii::t( + if(!$mailService->run()){ + Yii::$app->session->addFlash('error', Yii::t('usuario','The email sending failed, please check your configuration.')); + }else{ + // put key in session + Yii::$app->session->set("email_code_time", date('Y-m-d H:i:s')); + Yii::$app->session->set("email_code", $code); + } return $code; } } diff --git a/src/User/Service/TwoFactorSmsCodeGeneratorService.php b/src/User/Service/TwoFactorSmsCodeGeneratorService.php index 1bb63e1..7768b6c 100644 --- a/src/User/Service/TwoFactorSmsCodeGeneratorService.php +++ b/src/User/Service/TwoFactorSmsCodeGeneratorService.php @@ -67,13 +67,19 @@ class TwoFactorSmsCodeGeneratorService implements ServiceInterface if( !(null===$mobilePhone) && $mobilePhone!='' ){ // send sms - $this->smsSender->send($mobilePhone, $code); - // put key in session - Yii::$app->session->set("sms_code_time", date('Y-m-d H:i:s')); - Yii::$app->session->set("sms_code", $code); - } - - return $code; - + $success = $this->smsSender->send($mobilePhone, $code); + if($success){ + // put key in session + Yii::$app->session->set("sms_code_time", date('Y-m-d H:i:s')); + Yii::$app->session->set("sms_code", $code); + }else{ + Yii::$app->session->addFlash('error', Yii::t('usuario','The sms sending failed, please check your configuration.')); + return false; + } + } else{ + Yii::$app->session->addFlash('error', Yii::t('usuario','Mobile phone not found, please check your profile')); + return false; + } + return true; } } diff --git a/src/User/Validator/TwoFactorEmailValidator.php b/src/User/Validator/TwoFactorEmailValidator.php index 95d7238..ac10cd6 100644 --- a/src/User/Validator/TwoFactorEmailValidator.php +++ b/src/User/Validator/TwoFactorEmailValidator.php @@ -50,13 +50,15 @@ class TwoFactorEmailValidator extends TwoFactorCodeValidator */ public function validate() { + if(is_null($this->code) || $this->code == '' ) + return false; $emailCodeTime = new \DateTime(Yii::$app->session->get("email_code_time")); $currentTime = new \DateTime('now'); $interval = $currentTime->getTimestamp()-$emailCodeTime->getTimestamp(); $module = Yii::$app->getModule('user'); $validators = $module->twoFactorAuthenticationValidators; - $codeDurationTime = ArrayHelper::getValue($validators,$this->type.'.codeDurationTime', 0); + $codeDurationTime = ArrayHelper::getValue($validators,$this->type.'.codeDurationTime', 300); if($interval > $codeDurationTime ) return false; diff --git a/src/User/Validator/TwoFactorTextMessageValidator.php b/src/User/Validator/TwoFactorTextMessageValidator.php index 4455b41..9af30fa 100644 --- a/src/User/Validator/TwoFactorTextMessageValidator.php +++ b/src/User/Validator/TwoFactorTextMessageValidator.php @@ -50,12 +50,14 @@ class TwoFactorTextMessageValidator extends TwoFactorCodeValidator */ public function validate() { + if(is_null($this->code) || $this->code == '' ) + return false; $smsCodeTime = new \DateTime(Yii::$app->session->get("sms_code_time")); $currentTime = new \DateTime('now'); $interval = $currentTime->getTimestamp()-$smsCodeTime->getTimestamp(); $module = Yii::$app->getModule('user'); $validators = $module->twoFactorAuthenticationValidators; - $codeDurationTime = ArrayHelper::getValue($validators,$this->type.'.codeDurationTime', 0); + $codeDurationTime = ArrayHelper::getValue($validators,$this->type.'.codeDurationTime', 300); if($interval > $codeDurationTime ) return false; diff --git a/src/User/resources/i18n/ca/usuario.php b/src/User/resources/i18n/ca/usuario.php index 8d6dd3f..dbdf95f 100644 --- a/src/User/resources/i18n/ca/usuario.php +++ b/src/User/resources/i18n/ca/usuario.php @@ -142,6 +142,7 @@ return [ 'Login' => '', 'Logout' => '', 'Manage users' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Name' => '', @@ -207,6 +208,10 @@ return [ 'Thank you, registration is now complete.' => '', 'The "recaptcha" component must be configured.' => '', 'The confirmation link is invalid or expired. Please try requesting a new one.' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'The verification code is incorrect.' => '', 'There is neither role nor permission with name "{0}"' => '', 'There was an error in saving user' => '', @@ -288,11 +293,13 @@ return [ 'Your password has expired, you must change it now' => '', 'Your personal information has been removed' => '', 'Your profile has been updated' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'privacy policy' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', ]; diff --git a/src/User/resources/i18n/da/usuario.php b/src/User/resources/i18n/da/usuario.php index 8d6dd3f..dbdf95f 100644 --- a/src/User/resources/i18n/da/usuario.php +++ b/src/User/resources/i18n/da/usuario.php @@ -142,6 +142,7 @@ return [ 'Login' => '', 'Logout' => '', 'Manage users' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Name' => '', @@ -207,6 +208,10 @@ return [ 'Thank you, registration is now complete.' => '', 'The "recaptcha" component must be configured.' => '', 'The confirmation link is invalid or expired. Please try requesting a new one.' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'The verification code is incorrect.' => '', 'There is neither role nor permission with name "{0}"' => '', 'There was an error in saving user' => '', @@ -288,11 +293,13 @@ return [ 'Your password has expired, you must change it now' => '', 'Your personal information has been removed' => '', 'Your profile has been updated' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'privacy policy' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', ]; diff --git a/src/User/resources/i18n/de-DU/usuario.php b/src/User/resources/i18n/de-DU/usuario.php index 68b45a6..b24930d 100644 --- a/src/User/resources/i18n/de-DU/usuario.php +++ b/src/User/resources/i18n/de-DU/usuario.php @@ -281,20 +281,27 @@ return [ 'Insert the code you received by SMS.' => '', 'Insert the code you received by email.' => '', 'Insert the mobile phone number where you want to receive text message in international format' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please click on \'Cancel\' and repeat the login request.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please close this window and repeat the enabling request.' => '', 'Submit' => '', 'Text message' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'This is the code to insert to enable two factor authentication' => '', 'Two factor authentication code by SMS' => '', 'Two factor authentication code by email' => '', 'Unfortunately, you can not work with this site without giving us consent to process your data.' => '', 'Your consent is required to work with this site' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'A message has been sent to your email address. ' => '@@Eine Nachricht wurde an Deine E-Mail Adresse gesendet@@', 'Every user having your role has two factor authentication mandatory, you must enable it' => '@@@@', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', ]; diff --git a/src/User/resources/i18n/de/usuario.php b/src/User/resources/i18n/de/usuario.php index 0564503..67c5368 100644 --- a/src/User/resources/i18n/de/usuario.php +++ b/src/User/resources/i18n/de/usuario.php @@ -284,16 +284,23 @@ return [ 'Insert the code you received by SMS.' => '', 'Insert the code you received by email.' => '', 'Insert the mobile phone number where you want to receive text message in international format' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please click on \'Cancel\' and repeat the login request.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please close this window and repeat the enabling request.' => '', 'Text message' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'This is the code to insert to enable two factor authentication' => '', 'Two factor authentication code by SMS' => '', 'Two factor authentication code by email' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'Every user having your role has two factor authentication mandatory, you must enable it' => '@@@@', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', 'Now you can resume the login process' => '@@@@', diff --git a/src/User/resources/i18n/es/usuario.php b/src/User/resources/i18n/es/usuario.php index 1d90550..19a51a7 100644 --- a/src/User/resources/i18n/es/usuario.php +++ b/src/User/resources/i18n/es/usuario.php @@ -282,19 +282,26 @@ return [ 'Insert the code you received by SMS.' => '', 'Insert the code you received by email.' => '', 'Insert the mobile phone number where you want to receive text message in international format' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please click on \'Cancel\' and repeat the login request.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please close this window and repeat the enabling request.' => '', 'Text message' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'This is the code to insert to enable two factor authentication' => '', 'Two factor authentication code by SMS' => '', 'Two factor authentication code by email' => '', 'Your consent is required to work with this site' => '', + 'Your two factor authentication method is based on "{0}".' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', 'An email has been sent with instructions for resetting your password' => '@@Se ha enviado un correo electrónico con instrucciones para restablecer su contraseña@@', 'Every user having your role has two factor authentication mandatory, you must enable it' => '@@@@', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', 'Two factor authentication protects you against stolen credentials' => '@@La autenticación de dos factores le protege del robo de credenciales@@', diff --git a/src/User/resources/i18n/et/usuario.php b/src/User/resources/i18n/et/usuario.php index fe54eb2..c4af3b5 100644 --- a/src/User/resources/i18n/et/usuario.php +++ b/src/User/resources/i18n/et/usuario.php @@ -276,6 +276,7 @@ return [ 'Insert the code you received by SMS.' => '', 'Insert the code you received by email.' => '', 'Insert the mobile phone number where you want to receive text message in international format' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please click on \'Cancel\' and repeat the login request.' => '', @@ -283,6 +284,10 @@ return [ 'Rule class must extend "yii\\rbac\\Rule".' => '', 'Submit' => '', 'Text message' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'This is the code to insert to enable two factor authentication' => '', 'Two factor authentication code by SMS' => '', 'Two factor authentication code by email' => '', @@ -290,10 +295,12 @@ return [ 'VKontakte' => '', 'Yandex' => '', 'Your consent is required to work with this site' => '', + 'Your two factor authentication method is based on "{0}".' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', '{0, date, MMMM dd, YYYY HH:mm}' => '', 'Every user having your role has two factor authentication mandatory, you must enable it' => '@@@@', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', ]; diff --git a/src/User/resources/i18n/fa-IR/usuario.php b/src/User/resources/i18n/fa-IR/usuario.php index 6cb7a29..bc49f9a 100644 --- a/src/User/resources/i18n/fa-IR/usuario.php +++ b/src/User/resources/i18n/fa-IR/usuario.php @@ -210,6 +210,7 @@ return [ 'Last login IP' => '', 'Last login time' => '', 'Last password change' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Never' => '', @@ -242,6 +243,10 @@ return [ 'Switch identities is disabled.' => '', 'Text message' => '', 'The "recaptcha" component must be configured.' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'The verification code is incorrect.' => '', 'There is neither role nor permission with name "{0}"' => '', 'There was an error in saving user' => '', @@ -289,11 +294,13 @@ return [ 'Your consent is required to work with this site' => '', 'Your password has expired, you must change it now' => '', 'Your personal information has been removed' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'privacy policy' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'An email has been sent with instructions for resetting your password' => '@@ایمیلی حاوی راهنمایی برای تنظیم مجدد رمز عبور به شما ارسال شد@@', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', 'Registration ip' => '@@ای پی ثبت نام@@', diff --git a/src/User/resources/i18n/fi/usuario.php b/src/User/resources/i18n/fi/usuario.php index 8d6dd3f..dbdf95f 100644 --- a/src/User/resources/i18n/fi/usuario.php +++ b/src/User/resources/i18n/fi/usuario.php @@ -142,6 +142,7 @@ return [ 'Login' => '', 'Logout' => '', 'Manage users' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Name' => '', @@ -207,6 +208,10 @@ return [ 'Thank you, registration is now complete.' => '', 'The "recaptcha" component must be configured.' => '', 'The confirmation link is invalid or expired. Please try requesting a new one.' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'The verification code is incorrect.' => '', 'There is neither role nor permission with name "{0}"' => '', 'There was an error in saving user' => '', @@ -288,11 +293,13 @@ return [ 'Your password has expired, you must change it now' => '', 'Your personal information has been removed' => '', 'Your profile has been updated' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'privacy policy' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', ]; diff --git a/src/User/resources/i18n/fr/usuario.php b/src/User/resources/i18n/fr/usuario.php index a204e9e..0f74b58 100644 --- a/src/User/resources/i18n/fr/usuario.php +++ b/src/User/resources/i18n/fr/usuario.php @@ -280,20 +280,27 @@ return [ 'Insert the code you received by SMS.' => '', 'Insert the code you received by email.' => '', 'Insert the mobile phone number where you want to receive text message in international format' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please click on \'Cancel\' and repeat the login request.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please close this window and repeat the enabling request.' => '', 'Submit' => '', 'Text message' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'This is the code to insert to enable two factor authentication' => '', 'Two factor authentication code by SMS' => '', 'Two factor authentication code by email' => '', 'Unfortunately, you can not work with this site without giving us consent to process your data.' => '', 'Your consent is required to work with this site' => '', + 'Your two factor authentication method is based on "{0}".' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', 'Every user having your role has two factor authentication mandatory, you must enable it' => '@@@@', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', ]; diff --git a/src/User/resources/i18n/hr/usuario.php b/src/User/resources/i18n/hr/usuario.php index 8d6dd3f..dbdf95f 100644 --- a/src/User/resources/i18n/hr/usuario.php +++ b/src/User/resources/i18n/hr/usuario.php @@ -142,6 +142,7 @@ return [ 'Login' => '', 'Logout' => '', 'Manage users' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Name' => '', @@ -207,6 +208,10 @@ return [ 'Thank you, registration is now complete.' => '', 'The "recaptcha" component must be configured.' => '', 'The confirmation link is invalid or expired. Please try requesting a new one.' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'The verification code is incorrect.' => '', 'There is neither role nor permission with name "{0}"' => '', 'There was an error in saving user' => '', @@ -288,11 +293,13 @@ return [ 'Your password has expired, you must change it now' => '', 'Your personal information has been removed' => '', 'Your profile has been updated' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'privacy policy' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', ]; diff --git a/src/User/resources/i18n/hu/usuario.php b/src/User/resources/i18n/hu/usuario.php index 7d33fdd..d96938a 100644 --- a/src/User/resources/i18n/hu/usuario.php +++ b/src/User/resources/i18n/hu/usuario.php @@ -278,6 +278,7 @@ return [ 'Insert the code you received by SMS.' => '', 'Insert the code you received by email.' => '', 'Insert the mobile phone number where you want to receive text message in international format' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please click on \'Cancel\' and repeat the login request.' => '', @@ -286,12 +287,17 @@ return [ 'Select rule...' => '', 'Submit' => '', 'Text message' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'This is the code to insert to enable two factor authentication' => '', 'Two factor authentication code by SMS' => '', 'Two factor authentication code by email' => '', 'Two factor authentication protects you in case of stolen credentials' => '', 'Unfortunately, you can not work with this site without giving us consent to process your data.' => '', 'Your consent is required to work with this site' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'A message has been sent to your email address. ' => '@@Üzenet érkezett az e-mail címedre.@@', 'An email has been sent with instructions for resetting your password' => '@@E-mailt küldtek a jelszó visszaállításával kapcsolatos utasításokkal@@', 'Awesome, almost there. ' => '@@Hurrá, majdnem kész.@@', @@ -300,6 +306,7 @@ return [ 'Every user having your role has two factor authentication mandatory, you must enable it' => '@@@@', 'I aggree processing of my personal data and the use of cookies to facilitate the operation of this site. For more information read our {privacyPolicy}' => '@@Aggregálom a személyes adataim feldolgozását és a cookie-k használatát a webhely működésének megkönnyítése érdekében. További információért olvassa el a {privacyPolicy}@@', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Invalid two-factor code' => '@@Érvénytelen kétütemű kód@@', 'Last login' => '@@Utolsó bejelentkezés@@', diff --git a/src/User/resources/i18n/it/usuario.php b/src/User/resources/i18n/it/usuario.php index 8295187..a6ef150 100644 --- a/src/User/resources/i18n/it/usuario.php +++ b/src/User/resources/i18n/it/usuario.php @@ -206,6 +206,10 @@ return [ 'Thank you, registration is now complete.' => 'Grazie, la tua registrazione è completa.', 'The "recaptcha" component must be configured.' => 'Occorre configurare il componente "recaptcha".', 'The confirmation link is invalid or expired. Please try requesting a new one.' => 'Il link di conferma non è valido o scaduto. Per favore prova a richiederne uno nuovo', + 'The email address set is: "{0}".' => 'L\'indirizzo email impostato è: "{0}".', + 'The email sending failed, please check your configuration.' => 'L\'invio della email non è riuscito, verifica la configurazione', + 'The phone number set is: "{0}".' => 'Il numero di telefono impostato è: "{0}".', + 'The sms sending failed, please check your configuration.' => 'L\'invio del messaggio di testo non è riuscito, verifica la configurazione', 'The verification code is incorrect.' => 'Il codice di verifica non è corretto.', 'There is neither role nor permission with name "{0}"' => 'Non esiste un ruolo o permesso di nome "{0}', 'There was an error in saving user' => 'Errore in salvataggio utente', @@ -286,14 +290,16 @@ return [ 'Your password has expired, you must change it now' => 'La tua password è scaduta, devi cambiarla', 'Your personal information has been removed' => 'I tuoi dati personali sono stati rimossi', 'Your profile has been updated' => 'Il tuo profilo è stato aggiornato', + 'Your two factor authentication method is based on "{0}".' => 'La tua autenticazione a due fattori è basata su "{0}".', 'privacy policy' => 'politica della privacy', '{0, date, MMM dd, YYYY HH:mm}' => '{0, date, MMM dd, YYYY HH:mm}', '{0, date, MMMM dd, YYYY HH:mm}' => '{0, date, dd MMMM YYYY HH:mm}', '{0} cannot be blank.' => '{0} non può essere vuoto.', 'Insert the mobile phone number where you want to receive text message in international format' => '', + 'Mobile phone not found, please check your profile' => '', 'This is the code to insert to enable two factor authentication' => '', 'An email has been sent with instructions for resetting your password' => '@@È stata inviata un\'email con le istruzioni per azzerare la tua password@@', - 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@Inserisci il numero di telefono sul quale ricevere il messaggio di testo nel formato internazionale@@', 'Insert the mobile phone number where you want to receive the SMS.' => '@@Inserisci il numero del cellulare sul quale ricevere l\'SMS.@@', 'Mobile phone number not registered.' => '@@L\'attivazione del numero di cellulare non è riuscita@@', 'Now you can resume the login process' => '@@Ora puoi riprendere il processo di autenticazione@@', diff --git a/src/User/resources/i18n/kk/usuario.php b/src/User/resources/i18n/kk/usuario.php index 8d6dd3f..dbdf95f 100644 --- a/src/User/resources/i18n/kk/usuario.php +++ b/src/User/resources/i18n/kk/usuario.php @@ -142,6 +142,7 @@ return [ 'Login' => '', 'Logout' => '', 'Manage users' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Name' => '', @@ -207,6 +208,10 @@ return [ 'Thank you, registration is now complete.' => '', 'The "recaptcha" component must be configured.' => '', 'The confirmation link is invalid or expired. Please try requesting a new one.' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'The verification code is incorrect.' => '', 'There is neither role nor permission with name "{0}"' => '', 'There was an error in saving user' => '', @@ -288,11 +293,13 @@ return [ 'Your password has expired, you must change it now' => '', 'Your personal information has been removed' => '', 'Your profile has been updated' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'privacy policy' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', ]; diff --git a/src/User/resources/i18n/lt/usuario.php b/src/User/resources/i18n/lt/usuario.php index 8d6dd3f..dbdf95f 100644 --- a/src/User/resources/i18n/lt/usuario.php +++ b/src/User/resources/i18n/lt/usuario.php @@ -142,6 +142,7 @@ return [ 'Login' => '', 'Logout' => '', 'Manage users' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Name' => '', @@ -207,6 +208,10 @@ return [ 'Thank you, registration is now complete.' => '', 'The "recaptcha" component must be configured.' => '', 'The confirmation link is invalid or expired. Please try requesting a new one.' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'The verification code is incorrect.' => '', 'There is neither role nor permission with name "{0}"' => '', 'There was an error in saving user' => '', @@ -288,11 +293,13 @@ return [ 'Your password has expired, you must change it now' => '', 'Your personal information has been removed' => '', 'Your profile has been updated' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'privacy policy' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', ]; diff --git a/src/User/resources/i18n/nl/usuario.php b/src/User/resources/i18n/nl/usuario.php index 21fa7d8..94caf95 100644 --- a/src/User/resources/i18n/nl/usuario.php +++ b/src/User/resources/i18n/nl/usuario.php @@ -278,6 +278,7 @@ return [ 'Insert the code you received by SMS.' => '', 'Insert the code you received by email.' => '', 'Insert the mobile phone number where you want to receive text message in international format' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please click on \'Cancel\' and repeat the login request.' => '', @@ -286,12 +287,17 @@ return [ 'Select rule...' => '', 'Submit' => '', 'Text message' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'This is the code to insert to enable two factor authentication' => '', 'Two factor authentication code by SMS' => '', 'Two factor authentication code by email' => '', 'Two factor authentication protects you in case of stolen credentials' => '', 'Unfortunately, you can not work with this site without giving us consent to process your data.' => '', 'Your consent is required to work with this site' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'A message has been sent to your email address. ' => '@@Een bericht werd naar jouw emailadres verzonden@@', 'An email has been sent with instructions for resetting your password' => '@@Er werd een email verstuurd met instructies om jouw wachtwoord te resetten@@', 'Awesome, almost there. ' => '@@Super, bijna klaar.@@', @@ -303,6 +309,7 @@ return [ to facilitate the operation of this site. For more information read our {privacyPolicy}' => '@@Ik ga akkoord dat mijn persoonlijke data en cookies worden verwerkt voor het gebruik van deze website. Voor meer informatie lees onze {privacyPolicy}@@', 'I aggree processing of my personal data and the use of cookies to facilitate the operation of this site. For more information read our {privacyPolicy}' => '@@Ik ga akkoord dat mijn persoonlijke data en cookies worden verwerkt voor het gebruik van deze website. Voor meer informatie lees onze {privacyPolicy}@@', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Invalid two-factor code' => '@@Ongeldige tweetraps authenticatie code@@', 'Last login' => '@@Laatste login@@', diff --git a/src/User/resources/i18n/pl/usuario.php b/src/User/resources/i18n/pl/usuario.php index 77f2c38..690ac0e 100644 --- a/src/User/resources/i18n/pl/usuario.php +++ b/src/User/resources/i18n/pl/usuario.php @@ -278,6 +278,7 @@ return [ 'Insert the code you received by SMS.' => '', 'Insert the code you received by email.' => '', 'Insert the mobile phone number where you want to receive text message in international format' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please click on \'Cancel\' and repeat the login request.' => '', @@ -286,17 +287,23 @@ return [ 'Select rule...' => '', 'Submit' => '', 'Text message' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'This is the code to insert to enable two factor authentication' => '', 'Two factor authentication code by SMS' => '', 'Two factor authentication code by email' => '', 'Two factor authentication protects you in case of stolen credentials' => '', 'Unfortunately, you can not work with this site without giving us consent to process your data.' => '', 'Your consent is required to work with this site' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'An email has been sent with instructions for resetting your password' => '@@Email z instrukcją resetowania hasła został wysłany@@', 'Disable Two-Factor Auth' => '@@Wyłącz uwierzytelnianie dwuetapowe@@', 'Enable Two-factor auth' => '@@Włącz uwierzytelnianie dwuetapowe@@', 'Every user having your role has two factor authentication mandatory, you must enable it' => '@@@@', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Invalid two-factor code' => '@@Nieprawidłowy kod uwierzytelniania dwuetapowego@@', 'Last login' => '@@Data ostatniego logowania@@', diff --git a/src/User/resources/i18n/pt-BR/usuario.php b/src/User/resources/i18n/pt-BR/usuario.php index d6988ea..4d34641 100644 --- a/src/User/resources/i18n/pt-BR/usuario.php +++ b/src/User/resources/i18n/pt-BR/usuario.php @@ -278,6 +278,7 @@ return [ 'Insert the code you received by SMS.' => '', 'Insert the code you received by email.' => '', 'Insert the mobile phone number where you want to receive text message in international format' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please click on \'Cancel\' and repeat the login request.' => '', @@ -286,12 +287,17 @@ return [ 'Select rule...' => '', 'Submit' => '', 'Text message' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'This is the code to insert to enable two factor authentication' => '', 'Two factor authentication code by SMS' => '', 'Two factor authentication code by email' => '', 'Two factor authentication protects you in case of stolen credentials' => '', 'Unfortunately, you can not work with this site without giving us consent to process your data.' => '', 'Your consent is required to work with this site' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'A message has been sent to your email address. ' => '@@Uma mensagem foi enviada para o seu endereço de e-mail.@@', 'An email has been sent with instructions for resetting your password' => '@@Um e-mail foi enviado com instruções para redefinir sua senha@@', 'Awesome, almost there. ' => '@@Incrível, quase lá.@@', @@ -303,6 +309,7 @@ return [ to facilitate the operation of this site. For more information read our {privacyPolicy}' => '@@Concordo com o processamento de meus dados pessoais e o uso de cookies para facilitar a operação deste site. Para mais informações, leia nosso {privacyPolicy}@@', 'I aggree processing of my personal data and the use of cookies to facilitate the operation of this site. For more information read our {privacyPolicy}' => '@@Concordo com o processamento de meus dados pessoais e o uso de cookies para facilitar a operação deste site. Para mais informações, leia nosso {privacyPolicy}@@', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Invalid two-factor code' => '@@Código de dois fatores inválido@@', 'Last login' => '@@Último login@@', diff --git a/src/User/resources/i18n/pt-PT/usuario.php b/src/User/resources/i18n/pt-PT/usuario.php index 57af028..a709254 100644 --- a/src/User/resources/i18n/pt-PT/usuario.php +++ b/src/User/resources/i18n/pt-PT/usuario.php @@ -272,6 +272,7 @@ return [ 'Insert the code you received by email.' => '', 'Insert the mobile phone number where you want to receive text message in international format' => '', 'Items' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Password' => '', @@ -281,6 +282,10 @@ return [ 'Select rule...' => '', 'Submit' => '', 'Text message' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'This is the code to insert to enable two factor authentication' => '', 'Two factor authentication code by SMS' => '', 'Two factor authentication code by email' => '', @@ -290,10 +295,12 @@ return [ 'Website' => '', 'Yandex' => '', 'Your consent is required to work with this site' => '', + 'Your two factor authentication method is based on "{0}".' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', '{0, date, MMMM dd, YYYY HH:mm}' => '', 'Every user having your role has two factor authentication mandatory, you must enable it' => '@@@@', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', ]; diff --git a/src/User/resources/i18n/ro/usuario.php b/src/User/resources/i18n/ro/usuario.php index 8689ce1..662d059 100644 --- a/src/User/resources/i18n/ro/usuario.php +++ b/src/User/resources/i18n/ro/usuario.php @@ -278,6 +278,7 @@ return [ 'Insert the code you received by SMS.' => '', 'Insert the code you received by email.' => '', 'Insert the mobile phone number where you want to receive text message in international format' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please click on \'Cancel\' and repeat the login request.' => '', @@ -286,12 +287,17 @@ return [ 'Select rule...' => '', 'Submit' => '', 'Text message' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'This is the code to insert to enable two factor authentication' => '', 'Two factor authentication code by SMS' => '', 'Two factor authentication code by email' => '', 'Two factor authentication protects you in case of stolen credentials' => '', 'Unfortunately, you can not work with this site without giving us consent to process your data.' => '', 'Your consent is required to work with this site' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'A message has been sent to your email address. ' => '@@A fost trimis un mesaj la adresa dvs. de e-mail.@@', 'An email has been sent with instructions for resetting your password' => '@@A fost trimis un e-mail cu instrucțiuni pentru resetarea parolei@@', 'Awesome, almost there. ' => '@@Minunat, aproape gata.@@', @@ -302,6 +308,7 @@ return [ to facilitate the operation of this site. For more information read our {privacyPolicy}' => '@@Am agregat prelucrarea datelor mele personale și utilizarea cookie-urilor pentru a facilita funcționarea acestui site. Pentru mai multe informații, citiți {privacyPolicy}@@', 'I aggree processing of my personal data and the use of cookies to facilitate the operation of this site. For more information read our {privacyPolicy}' => '@@Am agregat prelucrarea datelor mele personale și utilizarea cookie-urilor pentru a facilita funcționarea acestui site. Pentru mai multe informații, citiți {privacyPolicy}@@', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Invalid two-factor code' => '@@Cod de două factori nevalid@@', 'Last login' => '@@Ultima logare@@', diff --git a/src/User/resources/i18n/ru/usuario.php b/src/User/resources/i18n/ru/usuario.php index 69ffb3e..ec535ab 100644 --- a/src/User/resources/i18n/ru/usuario.php +++ b/src/User/resources/i18n/ru/usuario.php @@ -281,17 +281,23 @@ return [ 'Insert the code you received by SMS.' => '', 'Insert the code you received by email.' => '', 'Insert the mobile phone number where you want to receive text message in international format' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please click on \'Cancel\' and repeat the login request.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please close this window and repeat the enabling request.' => '', 'Submit' => '', 'Text message' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'This is the code to insert to enable two factor authentication' => '', 'Two factor authentication code by SMS' => '', 'Two factor authentication code by email' => '', 'Unfortunately, you can not work with this site without giving us consent to process your data.' => '', 'Your consent is required to work with this site' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'A message has been sent to your email address. ' => '@@Сообщение было отправлено на вашу электронную почту@@', 'An email has been sent with instructions for resetting your password' => '@@Вам отправлено письмо с инструкциями по смене пароля@@', 'Awesome, almost there. ' => '@@Замечательно, почти готово!@@', @@ -300,6 +306,7 @@ return [ 'Enable Two-factor auth' => '@@Включить двухфакторную авторизацию@@', 'Every user having your role has two factor authentication mandatory, you must enable it' => '@@@@', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Invalid two-factor code' => '@@Неверный код двухфакторной авторизации@@', 'Last login' => '@@Последний вход@@', diff --git a/src/User/resources/i18n/th/usuario.php b/src/User/resources/i18n/th/usuario.php index 8d6dd3f..dbdf95f 100644 --- a/src/User/resources/i18n/th/usuario.php +++ b/src/User/resources/i18n/th/usuario.php @@ -142,6 +142,7 @@ return [ 'Login' => '', 'Logout' => '', 'Manage users' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Name' => '', @@ -207,6 +208,10 @@ return [ 'Thank you, registration is now complete.' => '', 'The "recaptcha" component must be configured.' => '', 'The confirmation link is invalid or expired. Please try requesting a new one.' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'The verification code is incorrect.' => '', 'There is neither role nor permission with name "{0}"' => '', 'There was an error in saving user' => '', @@ -288,11 +293,13 @@ return [ 'Your password has expired, you must change it now' => '', 'Your personal information has been removed' => '', 'Your profile has been updated' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'privacy policy' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', ]; diff --git a/src/User/resources/i18n/tr-TR/usuario.php b/src/User/resources/i18n/tr-TR/usuario.php index 8d6dd3f..dbdf95f 100644 --- a/src/User/resources/i18n/tr-TR/usuario.php +++ b/src/User/resources/i18n/tr-TR/usuario.php @@ -142,6 +142,7 @@ return [ 'Login' => '', 'Logout' => '', 'Manage users' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Name' => '', @@ -207,6 +208,10 @@ return [ 'Thank you, registration is now complete.' => '', 'The "recaptcha" component must be configured.' => '', 'The confirmation link is invalid or expired. Please try requesting a new one.' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'The verification code is incorrect.' => '', 'There is neither role nor permission with name "{0}"' => '', 'There was an error in saving user' => '', @@ -288,11 +293,13 @@ return [ 'Your password has expired, you must change it now' => '', 'Your personal information has been removed' => '', 'Your profile has been updated' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'privacy policy' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', ]; diff --git a/src/User/resources/i18n/uk/usuario.php b/src/User/resources/i18n/uk/usuario.php index 11c0c0d..b4df57c 100644 --- a/src/User/resources/i18n/uk/usuario.php +++ b/src/User/resources/i18n/uk/usuario.php @@ -280,6 +280,7 @@ return [ 'Insert the code you received by SMS.' => '', 'Insert the code you received by email.' => '', 'Insert the mobile phone number where you want to receive text message in international format' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Please, enter the right code. The code is valid for {0} seconds. If you want to get a new code, please click on \'Cancel\' and repeat the login request.' => '', @@ -287,11 +288,16 @@ return [ 'Recovery message sent' => '', 'Submit' => '', 'Text message' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'This is the code to insert to enable two factor authentication' => '', 'Two factor authentication code by SMS' => '', 'Two factor authentication code by email' => '', 'Unfortunately, you can not work with this site without giving us consent to process your data.' => '', 'Your consent is required to work with this site' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'A message has been sent to your email address. ' => '@@На вашу електронну адресу надіслано повідомлення@@', 'An email has been sent with instructions for resetting your password' => '@@Лист з інструкціями по зміні пароля надіслано на електронну адресу@@', 'Awesome, almost there. ' => '@@Чудово, майже все.@@', @@ -301,6 +307,7 @@ return [ 'Every user having your role has two factor authentication mandatory, you must enable it' => '@@@@', 'I aggree processing of my personal data and the use of cookies to facilitate the operation of this site. For more information read our {privacyPolicy}' => '@@Я даю згоду на обробку моїх персональних даних та на використання cookie даним сайтом. Для більш детальної інформації ознайомтесь з {privacyPolicy}@@', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Invalid two-factor code' => '@@Невірний код двофакторної авторизації@@', 'Last login' => '@@Останній вхід@@', diff --git a/src/User/resources/i18n/vi/usuario.php b/src/User/resources/i18n/vi/usuario.php index 8d6dd3f..dbdf95f 100644 --- a/src/User/resources/i18n/vi/usuario.php +++ b/src/User/resources/i18n/vi/usuario.php @@ -142,6 +142,7 @@ return [ 'Login' => '', 'Logout' => '', 'Manage users' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Name' => '', @@ -207,6 +208,10 @@ return [ 'Thank you, registration is now complete.' => '', 'The "recaptcha" component must be configured.' => '', 'The confirmation link is invalid or expired. Please try requesting a new one.' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'The verification code is incorrect.' => '', 'There is neither role nor permission with name "{0}"' => '', 'There was an error in saving user' => '', @@ -288,11 +293,13 @@ return [ 'Your password has expired, you must change it now' => '', 'Your personal information has been removed' => '', 'Your profile has been updated' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'privacy policy' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', ]; diff --git a/src/User/resources/i18n/zh-CN/usuario.php b/src/User/resources/i18n/zh-CN/usuario.php index 8d6dd3f..dbdf95f 100644 --- a/src/User/resources/i18n/zh-CN/usuario.php +++ b/src/User/resources/i18n/zh-CN/usuario.php @@ -142,6 +142,7 @@ return [ 'Login' => '', 'Logout' => '', 'Manage users' => '', + 'Mobile phone not found, please check your profile' => '', 'Mobile phone number' => '', 'Mobile phone number successfully enabled.' => '', 'Name' => '', @@ -207,6 +208,10 @@ return [ 'Thank you, registration is now complete.' => '', 'The "recaptcha" component must be configured.' => '', 'The confirmation link is invalid or expired. Please try requesting a new one.' => '', + 'The email address set is: "{0}".' => '', + 'The email sending failed, please check your configuration.' => '', + 'The phone number set is: "{0}".' => '', + 'The sms sending failed, please check your configuration.' => '', 'The verification code is incorrect.' => '', 'There is neither role nor permission with name "{0}"' => '', 'There was an error in saving user' => '', @@ -288,11 +293,13 @@ return [ 'Your password has expired, you must change it now' => '', 'Your personal information has been removed' => '', 'Your profile has been updated' => '', + 'Your two factor authentication method is based on "{0}".' => '', 'privacy policy' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'Insert the mobile phone number on which to receive text message.' => '@@@@', + 'Insert the mobile phone number where you want to receive text message in international format.' => '@@@@', 'Insert the mobile phone number where you want to receive text message.' => '@@@@', 'Mobile phone number not registered.' => '@@@@', ]; diff --git a/src/User/resources/views/settings/account.php b/src/User/resources/views/settings/account.php index 42c9164..4acfef0 100644 --- a/src/User/resources/views/settings/account.php +++ b/src/User/resources/views/settings/account.php @@ -12,6 +12,7 @@ use yii\helpers\Html; use yii\helpers\Url; use yii\widgets\ActiveForm; +use dmstr\widgets\Alert; /** * @var yii\web\View $this @@ -102,43 +103,70 @@ $module = Yii::$app->getModule('user');

.

- enableTwoFactorAuthentication && !$model->getUser()->auth_tf_enabled): - $validators = $module->twoFactorAuthenticationValidators; + getUser()->auth_tf_enabled): + $validators = $module->twoFactorAuthenticationValidators; + $theFirstFound = false; foreach( $validators as $name => $validator ) { - $description = $validator[ "description" ]; - $checked = $name=='google-authenticator'?'checked':''; - ?> -
- > - -
- +
+ > + +
+ -
- $model->getUser()->id], - [ - 'id' => 'disable_tf_btn', - 'class' => 'btn btn-warning ' . ($model->getUser()->auth_tf_enabled ? '' : 'hide'), - 'data-method' => 'post', - 'data-confirm' => Yii::t('usuario', 'This will disable two factor authentication. Are you sure?'), - ] - ) ?> + ?> 'enable_tf_btn', - 'class' => 'btn btn-info ' . ($model->getUser()->auth_tf_enabled ? 'hide' : ''), + 'class' => 'btn btn-info', 'data-toggle' => 'modal', 'data-target' => '#tfmodal' ] ) ?> -
+ +

+ getUser()->auth_tf_type; + $message = ''; + switch ($method) { + case 'email': + $message = Yii::t('usuario', 'The email address set is: "{0}".', [ $model->getUser()->email] ); + break; + case 'sms': + $message = Yii::t('usuario', 'The phone number set is: "{0}".', [ $model->getUser()->auth_tf_mobile_phone]); + break; + } + ?> + +

+
+ $model->getUser()->id], + [ + 'id' => 'disable_tf_btn', + 'class' => 'btn btn-warning ', + 'data-method' => 'post', + 'data-confirm' => Yii::t('usuario', 'This will disable two factor authentication. Are you sure?'), + ] + ) ?> +
+