From bcdf9985f2aef3aad515a99c2d9933008d971b84 Mon Sep 17 00:00:00 2001 From: bscheshirwork Date: Fri, 14 Sep 2018 18:16:55 +0300 Subject: [PATCH 01/17] About filter for backend and frontend --- .../migration-guide-from-dektrium-tools.md | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/docs/installation/migration-guide-from-dektrium-tools.md b/docs/installation/migration-guide-from-dektrium-tools.md index fc026b3..4ecc5ef 100644 --- a/docs/installation/migration-guide-from-dektrium-tools.md +++ b/docs/installation/migration-guide-from-dektrium-tools.md @@ -66,6 +66,52 @@ $module = Yii::$app->getModule('user'); if(Yii::$app->session->has($module->switchIdentitySessionKey)) ``` +## BackendFilter and FrontendFilter +BackendFilter disable this controllers: 'profile', 'recovery', 'registration', 'settings'; +FrontendFilter disable this controller: 'admin'; + +This functional is dropped. +Use `deny` rule in your configuration directly. +For example change `frontend` config like this: + +``` + 'modules' => [ + 'user' => [ + 'controllerMap' => [ + 'admin' => [ + 'class' => Da\User\Controller\AdminController::class, + 'as access' => [ + 'class' => yii\filters\AccessControl::class, + 'rules' => [['allow' => false]], + ], + ], + 'role' => [ + 'class' => Da\User\Controller\RoleController::class, + 'as access' => [ + 'class' => yii\filters\AccessControl::class, + 'rules' => [['allow' => false]], + ], + ], + 'permission' => [ + 'class' => Da\User\Controller\PermissionController::class, + 'as access' => [ + 'class' => yii\filters\AccessControl::class, + 'rules' => [['allow' => false]], + ], + ], + 'rule' => [ + 'class' => Da\User\Controller\RuleController::class, + 'as access' => [ + 'class' => yii\filters\AccessControl::class, + 'rules' => [['allow' => false]], + ], + ], + ], + ], + ], + +``` + ## Rbac migrations [yii2-rbac](https://github.com/dektrium/yii2-rbac) have a nice tool which are rbac migrations, which help writing new permissions and roles. From c6aa69ba7b0dfe32eabc78e5ab4d186460d128e7 Mon Sep 17 00:00:00 2001 From: bscheshirwork Date: Thu, 20 Sep 2018 16:51:55 +0300 Subject: [PATCH 02/17] use asset-packagist instead of fxp-asset --- composer.json | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index 96febfc..82b9d2e 100644 --- a/composer.json +++ b/composer.json @@ -80,16 +80,7 @@ "*": "auto" }, "fxp-asset": { - "installer-paths": { - "npm-asset-library": "vendor/npm", - "bower-asset-library": "vendor/bower" - }, - "vcs-driver-options": { - "github-no-api": true - }, - "git-skip-update": "2 days", - "pattern-skip-version": "(-build|-patch)" - } + "enabled": false } }, "conflict": { "dektrium/yii2-rbac": "*", @@ -97,5 +88,11 @@ }, "extra": { "bootstrap": "Da\\User\\Bootstrap" - } + }, + "repositories": [ + { + "type": "composer", + "url": "https://asset-packagist.org" + } + ] } From 5bbeba85499ae51091aa34234e29fe4b386921e0 Mon Sep 17 00:00:00 2001 From: bscheshirwork Date: Thu, 20 Sep 2018 16:58:34 +0300 Subject: [PATCH 03/17] :book: --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5ba762..33e78e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - Enh: Add controller module class reference (TonisOrmisson) - Enh: Replace the deprecated InvalidParamException in ClassMapHelper (TonisOrmisson) - Fix #242: Add POST filter for `admin/force-password-change` action (bscheshirwork) + - Enh #251: Use `asset-packagist` instead of `fxp-asset` if you run it as a module without having a project around (bscheshirwork) ## 1.1.4 - February 19, 2018 - Enh: Check enableEmailConfirmation on registration (faenir) From 0f54fe3fe16b4c3b36a076a7f16384ae52e73f1c Mon Sep 17 00:00:00 2001 From: bscheshirwork Date: Thu, 20 Sep 2018 17:19:13 +0300 Subject: [PATCH 04/17] travis configure --- .travis.yml | 1 - composer.json | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 83741c8..dbe3f4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,6 @@ install: phpenv config-rm xdebug.ini || echo "xdebug is not installed" fi - travis_retry composer self-update && composer --version - - travis_retry composer global require "fxp/composer-asset-plugin:^1.4.0" - export PATH="$HOME/.composer/vendor/bin:$PATH" - COMPOSER_MEMORY_LIMIT=-1 travis_retry composer install --prefer-dist --no-interaction diff --git a/composer.json b/composer.json index 82b9d2e..0c99f6e 100644 --- a/composer.json +++ b/composer.json @@ -80,7 +80,8 @@ "*": "auto" }, "fxp-asset": { - "enabled": false } + "enabled": false + } }, "conflict": { "dektrium/yii2-rbac": "*", From 6d7abd91ce35791039d56b2f9d98e1e3b12460f1 Mon Sep 17 00:00:00 2001 From: bscheshirwork Date: Thu, 20 Sep 2018 17:43:08 +0300 Subject: [PATCH 05/17] add aliases --- tests/_app/config/console.php | 2 ++ tests/_app/config/test.php | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/_app/config/console.php b/tests/_app/config/console.php index e3da14f..1264cd0 100644 --- a/tests/_app/config/console.php +++ b/tests/_app/config/console.php @@ -6,6 +6,8 @@ return [ 'aliases' => [ '@Da/User' => dirname(dirname(dirname(__DIR__))) . '/src/User', '@tests' => dirname(dirname(__DIR__)), + '@bower' => '@vendor/bower-asset', + '@npm' => '@vendor/npm-asset', ], 'components' => [ 'log' => null, diff --git a/tests/_app/config/test.php b/tests/_app/config/test.php index 650ae4b..690b908 100644 --- a/tests/_app/config/test.php +++ b/tests/_app/config/test.php @@ -8,7 +8,8 @@ return [ '@Da/User' => dirname(dirname(dirname(__DIR__))) . '/src/User', '@tests' => dirname(dirname(__DIR__)), '@vendor' => VENDOR_DIR, - '@bower' => VENDOR_DIR . '/bower', + '@bower' => '@vendor/bower-asset', + '@npm' => '@vendor/npm-asset', ], 'bootstrap' => ['Da\User\Bootstrap'], 'modules' => [ From 10afb076c45ab4612cabfa976cd3dd7ea4d2efc7 Mon Sep 17 00:00:00 2001 From: bscheshirwork Date: Mon, 15 Oct 2018 18:29:03 +0300 Subject: [PATCH 06/17] Rename gdprdelete action to gdpr-delete --- CHANGELOG.md | 1 + docs/installation/available-actions.md | 2 +- src/User/Controller/SettingsController.php | 6 +++--- .../views/settings/{gdprdelete.php => gdpr-delete.php} | 3 ++- src/User/resources/views/settings/privacy.php | 2 +- tests/functional/GdprCest.php | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) rename src/User/resources/views/settings/{gdprdelete.php => gdpr-delete.php} (93%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a02da8..a5766f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - Fix #242: Add POST filter for `admin/force-password-change` action (bscheshirwork) - Fix #252: Delete check for unexpected property `allowPasswordRecovery` for resend email by admin (bscheshirwork) - Fix #254: Rename `GDPR` properties to `lowerCamelCase` style (bscheshirwork) + - Fix #258: Rename `GDPR` delete action to `lowerCamelCase`/`dash` style (bscheshirwork) ## 1.1.4 - February 19, 2018 - Enh: Check enableEmailConfirmation on registration (faenir) diff --git a/docs/installation/available-actions.md b/docs/installation/available-actions.md index b388507..8fe7408 100644 --- a/docs/installation/available-actions.md +++ b/docs/installation/available-actions.md @@ -20,7 +20,7 @@ The following is the list of action provided by the module: | **/user/settings/delete** | Delete self account | | POST only | **/user/settings/disconnect** | Disconnect social account | | POST only | **/user/settings/export** | Download personal data in a comma separated values format -| **/user/settings/gdprdelete** | Displays delete personal data page | +| **/user/settings/gdpr-delete** | Displays delete personal data page | | **/user/settings/networks** | Displays social network accounts settings page | **/user/settings/privacy** | Displays GDPR data page | **/user/settings/profile** | Displays profile settings form diff --git a/src/User/Controller/SettingsController.php b/src/User/Controller/SettingsController.php index d28af88..0f77e9e 100644 --- a/src/User/Controller/SettingsController.php +++ b/src/User/Controller/SettingsController.php @@ -107,7 +107,7 @@ class SettingsController extends Controller 'export', 'networks', 'privacy', - 'gdprdelete', + 'gdpr-delete', 'disconnect', 'delete', 'two-factor', @@ -167,7 +167,7 @@ class SettingsController extends Controller ]); } - public function actionGdprdelete() + public function actionGdprDelete() { if (!$this->module->enableGdprCompliance) throw new NotFoundHttpException(); @@ -220,7 +220,7 @@ class SettingsController extends Controller } - return $this->render('gdprdelete', [ + return $this->render('gdpr-delete', [ 'model' => $form, ]); } diff --git a/src/User/resources/views/settings/gdprdelete.php b/src/User/resources/views/settings/gdpr-delete.php similarity index 93% rename from src/User/resources/views/settings/gdprdelete.php rename to src/User/resources/views/settings/gdpr-delete.php index a849352..5aa0e60 100644 --- a/src/User/resources/views/settings/gdprdelete.php +++ b/src/User/resources/views/settings/gdpr-delete.php @@ -10,6 +10,7 @@ use yii\widgets\ActiveForm; use yii\helpers\Html; + /* @var $model \Da\User\Form\GdprDeleteForm */ ?> @@ -46,7 +47,7 @@ use yii\helpers\Html;
- 'btn btn-info']) ?> + 'btn btn-info']) ?>
title = Yii::t('usuario', 'Privacy settings'); ) ?> 'btn btn-danger', 'id' => 'gdpr-del-button', diff --git a/tests/functional/GdprCest.php b/tests/functional/GdprCest.php index 230dc13..b0de920 100644 --- a/tests/functional/GdprCest.php +++ b/tests/functional/GdprCest.php @@ -141,7 +141,7 @@ class GdprCest $I->amOnRoute('/user/settings/privacy'); $I->see('Export my data', 'h3'); $I->see('Delete my account', 'h3'); - $I->amOnRoute('/user/settings/gdprdelete'); + $I->amOnRoute('/user/settings/gdpr-delete'); $I->fillField('#gdprdeleteform-password','wrongpassword'); $I->click('Delete'); $I->see('Invalid password'); From 84f661260e93f4276edd75c3cee06b72b9ba49c7 Mon Sep 17 00:00:00 2001 From: bscheshirwork Date: Wed, 17 Oct 2018 12:15:03 +0300 Subject: [PATCH 07/17] :book: --- src/User/resources/i18n/de/usuario.php | 2 +- src/User/resources/i18n/pl/usuario.php | 2 +- src/User/resources/i18n/pt-BR/usuario.php | 2 +- src/User/resources/i18n/ro/usuario.php | 2 +- src/User/resources/i18n/ru/usuario.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/User/resources/i18n/de/usuario.php b/src/User/resources/i18n/de/usuario.php index 21a36c7..c8462ea 100644 --- a/src/User/resources/i18n/de/usuario.php +++ b/src/User/resources/i18n/de/usuario.php @@ -293,7 +293,7 @@ return [ 'Your confirmation token is invalid or expired' => 'Ihr Bestätigungs-Token ist falsch oder abgelaufen', 'Your email address has been changed' => 'Ihre E-Mail Adresse wurde geändert', 'Your profile has been updated' => 'Ihr Profil wurde gespeichert', - '{0, date, MMM dd, YYYY HH:mm}' => '@@@@', + '{0, date, MMM dd, YYYY HH:mm}' => '{0, date, dd. MMM YYYY, HH:mm}', '{0, date, MMMM dd, YYYY HH:mm}' => '{0, date, dd. MMMM YYYY, HH:mm}', '{0} cannot be blank.' => '{0} darf nicht leer sein.', ]; diff --git a/src/User/resources/i18n/pl/usuario.php b/src/User/resources/i18n/pl/usuario.php index b2f2f7f..196d08a 100644 --- a/src/User/resources/i18n/pl/usuario.php +++ b/src/User/resources/i18n/pl/usuario.php @@ -285,7 +285,7 @@ return [ 'Your personal information has been removed' => 'Twoje dane osobowe zostały usunięte', 'Your profile has been updated' => 'Twój profil został zaktualizowany', 'privacy policy' => 'polityką prywatności', - '{0, date, MMM dd, YYYY HH:mm}' => '@@@@', + '{0, date, MMM dd, YYYY HH:mm}' => '{0, date, dd MMM YYYY, HH:mm}', '{0, date, MMMM dd, YYYY HH:mm}' => '{0, date, dd MMMM YYYY, HH:mm}', '{0} cannot be blank.' => '{0} nie może pozostać bez wartości', ]; diff --git a/src/User/resources/i18n/pt-BR/usuario.php b/src/User/resources/i18n/pt-BR/usuario.php index e26ea89..4f77917 100644 --- a/src/User/resources/i18n/pt-BR/usuario.php +++ b/src/User/resources/i18n/pt-BR/usuario.php @@ -293,7 +293,7 @@ return [ 'Your personal information has been removed' => 'Suas informações pessoais foram removidas', 'Your profile has been updated' => 'Seu perfil foi atualizado', 'privacy policy' => 'política de Privacidade', - '{0, date, MMM dd, YYYY HH:mm}' => '@@@@', + '{0, date, MMM dd, YYYY HH:mm}' => '{0, date, MMM dd, YYYY HH:mm}', '{0, date, MMMM dd, YYYY HH:mm}' => '{0, date, MMMM dd, YYYY HH:mm}', '{0} cannot be blank.' => '{0} não pode estar em branco', ]; diff --git a/src/User/resources/i18n/ro/usuario.php b/src/User/resources/i18n/ro/usuario.php index 7a828f0..38ab2bf 100644 --- a/src/User/resources/i18n/ro/usuario.php +++ b/src/User/resources/i18n/ro/usuario.php @@ -289,7 +289,7 @@ return [ 'Your personal information has been removed' => 'Informațiile dvs. personale au fost eliminate', 'Your profile has been updated' => 'Profilul dvs. a fost actualizat', 'privacy policy' => 'politica de confidentialitate', - '{0, date, MMM dd, YYYY HH:mm}' => '@@@@', + '{0, date, MMM dd, YYYY HH:mm}' => '{0, data, MMM dd, AAAA HH: mm}', '{0, date, MMMM dd, YYYY HH:mm}' => '{0, data, MMMM dd, AAAA HH: mm}', '{0} cannot be blank.' => '{0} nu poate fi gol.', ]; diff --git a/src/User/resources/i18n/ru/usuario.php b/src/User/resources/i18n/ru/usuario.php index c40552b..73c12db 100644 --- a/src/User/resources/i18n/ru/usuario.php +++ b/src/User/resources/i18n/ru/usuario.php @@ -291,7 +291,7 @@ return [ 'Your personal information has been removed' => 'Ваша персональная информация удалена', 'Your profile has been updated' => 'Настройки профиля были успешно сохранены', 'privacy policy' => 'политикой конфиденциальности', - '{0, date, MMM dd, YYYY HH:mm}' => '@@@@', + '{0, date, MMM dd, YYYY HH:mm}' => '{0, date, d MMM YYYY в HH:mm}', '{0, date, MMMM dd, YYYY HH:mm}' => '{0, date, d MMMM YYYY в HH:mm}', '{0} cannot be blank.' => '{0} не может быть пустым.', ]; From 67ebfe4493382b84a65faa36ae0cc91fb4322790 Mon Sep 17 00:00:00 2001 From: bscheshirwork Date: Fri, 19 Oct 2018 11:56:54 +0300 Subject: [PATCH 08/17] Add note about access to switch-identity action --- .../helpful-guides/how-to-swith-identities.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs/helpful-guides/how-to-swith-identities.md b/docs/helpful-guides/how-to-swith-identities.md index 76e7058..378c0c5 100644 --- a/docs/helpful-guides/how-to-swith-identities.md +++ b/docs/helpful-guides/how-to-swith-identities.md @@ -21,6 +21,39 @@ if(Yii::$app->session->has($module->switchIdentitySessionKey)) { echo Html::a('Switch to Admin', ['/user/admin/switch-identity'], ['data-method' => 'post']); } ``` +> Note: If you use RBAC we can add access for all user to to this action for back to original user available. +```php +... + 'modules' => [ + 'user' => [ + 'controllerMap' => [ + 'admin' => [ + 'class' => Da\User\Controller\AdminController::class, + 'as access' => [ + 'class' => yii\filters\AccessControl::class, + 'rules' => [ + ['allow' => true, 'actions' => ['switch-identity']], + ['allow' => true, 'permissions' => ['administrateUser']], + ], + ], + ], + ], + ], + ], +... +``` +> Also you can define access role `'administratorPermissionName' => 'admin',` where `admin` is have `administrateUser` permission +```php +... + 'modules' => [ + 'user' => [ + 'class' => Da\User\Module::class, + 'administratorPermissionName' => 'admin', + ], + ], +... +``` + Check the [switchIdentitySessionKey](../installation/configuration-options.md#switchidentitysessionkey) documentation for further information regarding this configuration option. From 72e930e0c1eab173cff6e25e46eba80f0e6c103a Mon Sep 17 00:00:00 2001 From: bscheshirwork Date: Fri, 19 Oct 2018 16:39:50 +0300 Subject: [PATCH 09/17] Add set flash to example for more complex view --- docs/enhancing-and-overriding/overriding-controllers.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/enhancing-and-overriding/overriding-controllers.md b/docs/enhancing-and-overriding/overriding-controllers.md index 186c7c2..1ba1c98 100644 --- a/docs/enhancing-and-overriding/overriding-controllers.md +++ b/docs/enhancing-and-overriding/overriding-controllers.md @@ -20,6 +20,7 @@ Please, before you override a controller's action, make sure that it won't be en 'on ' . \Da\User\Event\ResetPasswordEvent::EVENT_AFTER_RESET => function (\Da\User\Event\ResetPasswordEvent $event) { if ($event->token->user ?? false) { \Yii::$app->user->login($event->token->user); + \Yii::$app->session->setFlash('success', Yii::t('usuario', 'Password has been changed')); } \Yii::$app->controller->redirect(\Yii::$app->getUser()->getReturnUrl()); \Yii::$app->end(); From c0390338173b4b90d2114a7c29d5b3c1216ffcf6 Mon Sep 17 00:00:00 2001 From: bscheshirwork Date: Fri, 19 Oct 2018 17:50:55 +0300 Subject: [PATCH 10/17] Add another flash to example for more complex view --- docs/enhancing-and-overriding/overriding-controllers.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/enhancing-and-overriding/overriding-controllers.md b/docs/enhancing-and-overriding/overriding-controllers.md index 1ba1c98..7dfc8f6 100644 --- a/docs/enhancing-and-overriding/overriding-controllers.md +++ b/docs/enhancing-and-overriding/overriding-controllers.md @@ -33,6 +33,7 @@ Please, before you override a controller's action, make sure that it won't be en \Yii::$app->end(); }, 'on ' . \Da\User\Event\FormEvent::EVENT_AFTER_RESEND => function (\Da\User\Event\FormEvent $event) { + \Yii::$app->session->setFlash('info', Yii::t('usuario', 'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.')); \Yii::$app->controller->redirect(['/user/security/login']); \Yii::$app->end(); }, From 880bc5a09758b9b44731c5d05b6304af8b9c87d8 Mon Sep 17 00:00:00 2001 From: Antonio Ramirez Date: Sat, 20 Oct 2018 11:58:58 +0200 Subject: [PATCH 11/17] Update migration-guide-from-dektrium-tools.md --- docs/installation/migration-guide-from-dektrium-tools.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/installation/migration-guide-from-dektrium-tools.md b/docs/installation/migration-guide-from-dektrium-tools.md index 4ecc5ef..808c025 100644 --- a/docs/installation/migration-guide-from-dektrium-tools.md +++ b/docs/installation/migration-guide-from-dektrium-tools.md @@ -70,9 +70,7 @@ if(Yii::$app->session->has($module->switchIdentitySessionKey)) BackendFilter disable this controllers: 'profile', 'recovery', 'registration', 'settings'; FrontendFilter disable this controller: 'admin'; -This functional is dropped. -Use `deny` rule in your configuration directly. -For example change `frontend` config like this: +This functionality has been dropped. Use `deny` rule in your configuration directly. For example change `frontend` config like this: ``` 'modules' => [ From 3d9fd62aa0f298510fb64798c4238c61e7fc6fe8 Mon Sep 17 00:00:00 2001 From: Lorenzo Milesi Date: Mon, 22 Oct 2018 18:13:16 +0200 Subject: [PATCH 12/17] Missing translatable strings #276 --- CHANGELOG.md | 1 + src/User/Model/Rule.php | 12 +++ src/User/resources/i18n/ca/usuario.php | 2 + src/User/resources/i18n/da/usuario.php | 2 + src/User/resources/i18n/de-DU/usuario.php | 2 + src/User/resources/i18n/de/usuario.php | 2 + src/User/resources/i18n/es/usuario.php | 2 + src/User/resources/i18n/et/usuario.php | 2 + src/User/resources/i18n/fa-IR/usuario.php | 2 + src/User/resources/i18n/fi/usuario.php | 2 + src/User/resources/i18n/fr/usuario.php | 2 + src/User/resources/i18n/hr/usuario.php | 2 + src/User/resources/i18n/hu/usuario.php | 2 + src/User/resources/i18n/it/usuario.php | 2 + src/User/resources/i18n/kk/usuario.php | 2 + src/User/resources/i18n/lt/usuario.php | 2 + src/User/resources/i18n/nl/usuario.php | 2 + src/User/resources/i18n/pl/usuario.php | 2 + src/User/resources/i18n/pt-BR/usuario.php | 2 + src/User/resources/i18n/pt-PT/usuario.php | 78 ++++++++++--------- src/User/resources/i18n/ro/usuario.php | 2 + src/User/resources/i18n/ru/usuario.php | 2 + src/User/resources/i18n/th/usuario.php | 2 + src/User/resources/i18n/tr-TR/usuario.php | 2 + src/User/resources/i18n/uk/usuario.php | 2 + src/User/resources/i18n/vi/usuario.php | 2 + src/User/resources/i18n/zh-CN/usuario.php | 2 + src/User/resources/views/permission/_form.php | 2 +- src/User/resources/views/rule/create.php | 2 +- src/User/resources/views/rule/update.php | 2 +- 30 files changed, 104 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cacee1..fdfd888 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - Fix #252: Delete check for unexpected property `allowPasswordRecovery` for resend email by admin (bscheshirwork) - Fix #254: Rename `GDPR` properties to `lowerCamelCase` style (bscheshirwork) - Fix #258: Rename `GDPR` delete action to `lowerCamelCase`/`dash` style (bscheshirwork) + - Fix #276: Fix missing translatable strings ## 1.1.4 - February 19, 2018 - Enh: Check enableEmailConfirmation on registration (faenir) diff --git a/src/User/Model/Rule.php b/src/User/Model/Rule.php index f993368..a8d1f55 100644 --- a/src/User/Model/Rule.php +++ b/src/User/Model/Rule.php @@ -15,6 +15,7 @@ use Da\User\Traits\AuthManagerAwareTrait; use Da\User\Validator\RbacRuleNameValidator; use Da\User\Validator\RbacRuleValidator; use yii\base\Model; +use Yii; class Rule extends Model { @@ -57,4 +58,15 @@ class Rule extends Model [['className'], RbacRuleValidator::class], ]; } + + /** + * {@inheritdoc} + */ + public function attributeLabels() + { + return [ + 'name' => Yii::t('usuario', 'Name'), + 'className' => Yii::t('usuario', 'Rule class name'), + ]; + } } diff --git a/src/User/resources/i18n/ca/usuario.php b/src/User/resources/i18n/ca/usuario.php index 064eb08..89288fb 100644 --- a/src/User/resources/i18n/ca/usuario.php +++ b/src/User/resources/i18n/ca/usuario.php @@ -175,6 +175,7 @@ return [ 'Roles' => '', 'Rule' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', + 'Rule class name' => '', 'Rule name' => '', 'Rule name {0} is already in use' => '', 'Rule {0} does not exists' => '', @@ -182,6 +183,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Select rule...' => '', 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', diff --git a/src/User/resources/i18n/da/usuario.php b/src/User/resources/i18n/da/usuario.php index 064eb08..89288fb 100644 --- a/src/User/resources/i18n/da/usuario.php +++ b/src/User/resources/i18n/da/usuario.php @@ -175,6 +175,7 @@ return [ 'Roles' => '', 'Rule' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', + 'Rule class name' => '', 'Rule name' => '', 'Rule name {0} is already in use' => '', 'Rule {0} does not exists' => '', @@ -182,6 +183,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Select rule...' => '', 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', diff --git a/src/User/resources/i18n/de-DU/usuario.php b/src/User/resources/i18n/de-DU/usuario.php index 064eb08..89288fb 100644 --- a/src/User/resources/i18n/de-DU/usuario.php +++ b/src/User/resources/i18n/de-DU/usuario.php @@ -175,6 +175,7 @@ return [ 'Roles' => '', 'Rule' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', + 'Rule class name' => '', 'Rule name' => '', 'Rule name {0} is already in use' => '', 'Rule {0} does not exists' => '', @@ -182,6 +183,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Select rule...' => '', 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', diff --git a/src/User/resources/i18n/de/usuario.php b/src/User/resources/i18n/de/usuario.php index c8462ea..bba81ec 100644 --- a/src/User/resources/i18n/de/usuario.php +++ b/src/User/resources/i18n/de/usuario.php @@ -39,6 +39,8 @@ return [ 'Password age' => '', 'Privacy' => '', 'Privacy settings' => '', + 'Rule class name' => '', + 'Select rule...' => '', 'There was an error in saving user' => '', 'This will disable two factor authentication. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', diff --git a/src/User/resources/i18n/es/usuario.php b/src/User/resources/i18n/es/usuario.php index bfcf85e..db44f06 100644 --- a/src/User/resources/i18n/es/usuario.php +++ b/src/User/resources/i18n/es/usuario.php @@ -17,6 +17,8 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'Rule class name' => '', + 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', '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 afc2f8e..9fd8a3b 100644 --- a/src/User/resources/i18n/et/usuario.php +++ b/src/User/resources/i18n/et/usuario.php @@ -19,6 +19,8 @@ return [ 'Authentication rule class {0} can not be instantiated' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', + 'Rule class name' => '', + 'Select rule...' => '', 'VKontakte' => '', 'Yandex' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', diff --git a/src/User/resources/i18n/fa-IR/usuario.php b/src/User/resources/i18n/fa-IR/usuario.php index 064eb08..89288fb 100644 --- a/src/User/resources/i18n/fa-IR/usuario.php +++ b/src/User/resources/i18n/fa-IR/usuario.php @@ -175,6 +175,7 @@ return [ 'Roles' => '', 'Rule' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', + 'Rule class name' => '', 'Rule name' => '', 'Rule name {0} is already in use' => '', 'Rule {0} does not exists' => '', @@ -182,6 +183,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Select rule...' => '', 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', diff --git a/src/User/resources/i18n/fi/usuario.php b/src/User/resources/i18n/fi/usuario.php index 064eb08..89288fb 100644 --- a/src/User/resources/i18n/fi/usuario.php +++ b/src/User/resources/i18n/fi/usuario.php @@ -175,6 +175,7 @@ return [ 'Roles' => '', 'Rule' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', + 'Rule class name' => '', 'Rule name' => '', 'Rule name {0} is already in use' => '', 'Rule {0} does not exists' => '', @@ -182,6 +183,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Select rule...' => '', 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', diff --git a/src/User/resources/i18n/fr/usuario.php b/src/User/resources/i18n/fr/usuario.php index 064eb08..89288fb 100644 --- a/src/User/resources/i18n/fr/usuario.php +++ b/src/User/resources/i18n/fr/usuario.php @@ -175,6 +175,7 @@ return [ 'Roles' => '', 'Rule' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', + 'Rule class name' => '', 'Rule name' => '', 'Rule name {0} is already in use' => '', 'Rule {0} does not exists' => '', @@ -182,6 +183,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Select rule...' => '', 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', diff --git a/src/User/resources/i18n/hr/usuario.php b/src/User/resources/i18n/hr/usuario.php index 064eb08..89288fb 100644 --- a/src/User/resources/i18n/hr/usuario.php +++ b/src/User/resources/i18n/hr/usuario.php @@ -175,6 +175,7 @@ return [ 'Roles' => '', 'Rule' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', + 'Rule class name' => '', 'Rule name' => '', 'Rule name {0} is already in use' => '', 'Rule {0} does not exists' => '', @@ -182,6 +183,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Select rule...' => '', 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', diff --git a/src/User/resources/i18n/hu/usuario.php b/src/User/resources/i18n/hu/usuario.php index 2229086..b6e648a 100644 --- a/src/User/resources/i18n/hu/usuario.php +++ b/src/User/resources/i18n/hu/usuario.php @@ -17,6 +17,8 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'Rule class name' => '', + 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', 'A message has been sent to your email address. ' => '@@Üzenet érkezett az e-mail címedre.@@', 'Awesome, almost there. ' => '@@Hurrá, majdnem kész.@@', diff --git a/src/User/resources/i18n/it/usuario.php b/src/User/resources/i18n/it/usuario.php index c621f67..ffaeb70 100644 --- a/src/User/resources/i18n/it/usuario.php +++ b/src/User/resources/i18n/it/usuario.php @@ -17,6 +17,8 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'Rule class name' => '', + 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', 'Two factor authentication protects you against stolen credentials' => '@@L\'autenticazione a due fattori può proteggerti dal furto di credenziali@@', diff --git a/src/User/resources/i18n/kk/usuario.php b/src/User/resources/i18n/kk/usuario.php index 064eb08..89288fb 100644 --- a/src/User/resources/i18n/kk/usuario.php +++ b/src/User/resources/i18n/kk/usuario.php @@ -175,6 +175,7 @@ return [ 'Roles' => '', 'Rule' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', + 'Rule class name' => '', 'Rule name' => '', 'Rule name {0} is already in use' => '', 'Rule {0} does not exists' => '', @@ -182,6 +183,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Select rule...' => '', 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', diff --git a/src/User/resources/i18n/lt/usuario.php b/src/User/resources/i18n/lt/usuario.php index 064eb08..89288fb 100644 --- a/src/User/resources/i18n/lt/usuario.php +++ b/src/User/resources/i18n/lt/usuario.php @@ -175,6 +175,7 @@ return [ 'Roles' => '', 'Rule' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', + 'Rule class name' => '', 'Rule name' => '', 'Rule name {0} is already in use' => '', 'Rule {0} does not exists' => '', @@ -182,6 +183,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Select rule...' => '', 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', diff --git a/src/User/resources/i18n/nl/usuario.php b/src/User/resources/i18n/nl/usuario.php index 53fd14f..50ad205 100644 --- a/src/User/resources/i18n/nl/usuario.php +++ b/src/User/resources/i18n/nl/usuario.php @@ -17,6 +17,8 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'Rule class name' => '', + 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', 'A message has been sent to your email address. ' => '@@Een bericht werd naar jouw emailadres verzonden@@', 'Awesome, almost there. ' => '@@Super, bijna klaar.@@', diff --git a/src/User/resources/i18n/pl/usuario.php b/src/User/resources/i18n/pl/usuario.php index 196d08a..89a9b42 100644 --- a/src/User/resources/i18n/pl/usuario.php +++ b/src/User/resources/i18n/pl/usuario.php @@ -17,6 +17,8 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'Rule class name' => '', + 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', 'Disable Two-Factor Auth' => '@@Wyłącz uwierzytelnianie dwuetapowe@@', 'Enable Two-factor auth' => '@@Włącz uwierzytelnianie dwuetapowe@@', diff --git a/src/User/resources/i18n/pt-BR/usuario.php b/src/User/resources/i18n/pt-BR/usuario.php index 4f77917..61ef7e9 100644 --- a/src/User/resources/i18n/pt-BR/usuario.php +++ b/src/User/resources/i18n/pt-BR/usuario.php @@ -17,6 +17,8 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'Rule class name' => '', + 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', 'A message has been sent to your email address. ' => '@@Uma mensagem foi enviada para o seu endereço de e-mail.@@', 'Awesome, almost there. ' => '@@Incrível, quase lá.@@', diff --git a/src/User/resources/i18n/pt-PT/usuario.php b/src/User/resources/i18n/pt-PT/usuario.php index 36b153f..b3ae11f 100644 --- a/src/User/resources/i18n/pt-PT/usuario.php +++ b/src/User/resources/i18n/pt-PT/usuario.php @@ -17,7 +17,46 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'Awesome, almost there. Now you need to click the confirmation link sent to your new email address.' => '', + 'Awesome, almost there. Now you need to click the confirmation link sent to your old email address.' => '', + 'Children' => '', + 'Class' => '', + 'Email' => '', + 'Gravatar email' => '', + 'Items' => '', + 'Password' => '', + 'Rule class name' => '', + 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', + 'VKontakte' => '', + 'Website' => '', + 'Yandex' => '', + '{0, date, MMMM dd, YYYY HH:mm}' => '', + 'A message has been sent to your email address. ' => '@@@@', + 'Awesome, almost there. ' => '@@@@', + 'Class "{0}" does not exist' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', + '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}' => '@@@@', + '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}' => '@@@@', + 'Invalid two-factor code' => '@@@@', + 'Last login' => '@@@@', + 'Registration ip' => '@@@@', + 'Rule class can not be instantiated' => '@@@@', + 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'This will disable two-factor auth. Are you sure?' => '@@@@', + 'Two Factor Authentication' => '@@@@', + 'Two factor authentication protects you against stolen credentials' => '@@Autenticação de dois passos protege-o do roubo de credenciais de acesso@@', + 'Two factor successfully enabled.' => '@@@@', + 'Two-Factor Authentication' => '@@@@', + 'Two-factor auth protects you against stolen credentials' => '@@@@', + 'Two-factor authentication code' => '@@@@', + 'Two-factor authorization has been disabled.' => '@@@@', + 'Two-factor code' => '@@@@', + 'Unable to disable two-factor authorization.' => '@@@@', + 'We couldn\'t re-send the mail to confirm your address. ' => '@@@@', + 'We have sent confirmation links to both old and new email addresses. ' => '@@@@', '(not set)' => '(não selecionado)', 'A confirmation message has been sent to your new email address' => 'Foi enviada uma mensagem de confirmação para o seu endereço de email', 'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.' => 'Foi enviada uma mensagem para o seu endereço de email com o link de confirmação para completar o seu registo.', @@ -50,8 +89,6 @@ return [ 'Authorization rule has been added.' => 'Regra de autorização foi adicionada', 'Authorization rule has been removed.' => 'Regra de autorização foi removida', 'Authorization rule has been updated.' => 'Regra de autorização foi atualizada', - 'Awesome, almost there. Now you need to click the confirmation link sent to your new email address.' => '', - 'Awesome, almost there. Now you need to click the confirmation link sent to your old email address.' => '', 'Back to privacy settings' => 'Voltar para opções de privacidade', 'Bio' => 'Biografia', 'Block' => 'Bloquear', @@ -60,8 +97,6 @@ return [ 'Cancel' => 'Cancelar', 'Cannot assign role "{0}" as the AuthManager is not configured on your console application.' => 'Não é possível atribuir o cargo "{0}" uma vez que o AuthManager não está configurado na sua aplicação da consola.', 'Change your avatar at Gravatar.com' => 'Altere o seu avatar em Gravatar.com', - 'Children' => '', - 'Class' => '', 'Close' => 'Fechar', 'Complete password reset on {0}' => 'Concluir o restauro de password em {0}', 'Confirm' => 'Confirmar', @@ -95,7 +130,6 @@ return [ 'Disconnect' => 'Desligar', 'Don\'t have an account? Sign up!' => 'Não tem conta? Registe-se!', 'Download my data' => 'Descarregar os meus dados', - 'Email' => '', 'Email (public)' => 'Email (público)', 'Enable' => 'Ativar', 'Enable two factor authentication' => 'Ativar autenticação de dois passos', @@ -108,7 +142,6 @@ return [ 'Finish' => 'Concluir', 'Force password change at next login' => 'Forçar alteração de password no próximo login', 'Forgot password?' => 'Esqueceu a sua senha?', - 'Gravatar email' => '', 'Hello' => 'Olá', 'Here you can download your personal data in a comma separated values format.' => 'Aqui pode descarregar os seus dados pessoais num ficheiro separado por virgulas.', 'I agree processing of my personal data and the use of cookies to facilitate the operation of this site. For more information read our {privacyPolicy}' => 'Eu aceito o processamento dos meus dados pessoais e o uso de cookies para facilitar as operações neste site. Para mais informações leia a nossa {privacyPolicy}', @@ -126,7 +159,6 @@ return [ 'Invalid two factor authentication code' => 'Autenticação de dois passos inválida', 'Invalid value' => 'Valor inválido', 'It will be deleted forever' => 'Será eliminado definitivamente', - 'Items' => '', 'Joined on {0, date}' => 'Aderiu em {0, date}', 'Last login IP' => 'IP do último login', 'Last login time' => 'Último login', @@ -148,7 +180,6 @@ return [ 'Not found' => 'Não encontrado', 'Once you delete your account, there is no going back' => 'Após eliminar a sua conta, não será possível recuperá-la.', 'Once you have deleted your data, you will not longer be able to sign in with this account.' => 'Após eliminar os seus dados, não poderá mais entrar com esta conta.', - 'Password' => '', 'Password age' => 'Idade da password', 'Password has been changed' => 'A password foi alterada', 'Permissions' => 'Permissões', @@ -238,16 +269,13 @@ return [ 'User will be required to change password at next login' => 'O utilizador necessitará de alterar a password no próximo login', 'Username' => 'Utilizador', 'Users' => 'Utilizadores', - 'VKontakte' => '', 'Verification failed. Please, enter new code.' => 'Verificação falhou. Por favor insira novo código.', 'We couldn\'t re-send the mail to confirm your address. Please, verify is the correct email or if it has been confirmed already.' => 'Não foi possível reenviar o email de confirmação para o seu endereço. Por favor, verifique se é o email correto ou se já foi confirmado.', 'We have generated a password for you' => 'Gerámos uma nova password para si', 'We have received a request to change the email address for your account on {0}' => 'Recebemos um pedido para alterar o endereço de email para a sua conta em {0}', 'We have received a request to reset the password for your account on {0}' => 'Recebemos um pedido para restaura a password da sua conta em {0}', 'We have sent confirmation links to both old and new email addresses. You must click both links to complete your request.' => 'Enviámos links de confirmação para ambas as contas de email, antiga e nova. Deve seguir as instruções em ambos os emails para concluir o pedido.', - 'Website' => '', 'Welcome to {0}' => 'Bem-vindo a {0}', - 'Yandex' => '', 'You are about to delete all your personal data from this site.' => 'Está prestes a apagar todos os seus dados pessoais deste site.', 'You can assign multiple roles or permissions to user by using the form below' => 'Pode atribuir vários cargos ou permissões ao utilizador através do formulário abaixo', 'You can connect multiple accounts to be able to log in using them' => 'Pode ligar múltiplas contas de forma a poder entrar através delas', @@ -268,32 +296,6 @@ return [ 'Your personal information has been removed' => 'Os seus dados pessoais foram removidos', 'Your profile has been updated' => 'O seu perfil foi atualziado', 'privacy policy' => 'politica de privacidade', - '{0, date, MMMM dd, YYYY HH:mm}' => '', - '{0} cannot be blank.' => '{0} não pode ficar vazio.', - 'A message has been sent to your email address. ' => '@@@@', - 'Awesome, almost there. ' => '@@@@', - 'Class "{0}" does not exist' => '@@@@', - 'Disable Two-Factor Auth' => '@@@@', - 'Enable Two-factor auth' => '@@@@', - '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}' => '@@@@', - '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}' => '@@@@', - 'Invalid two-factor code' => '@@@@', - 'Last login' => '@@@@', - 'Registration ip' => '@@@@', - 'Rule class can not be instantiated' => '@@@@', - 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', - 'This will disable two-factor auth. Are you sure?' => '@@@@', - 'Two Factor Authentication' => '@@@@', - 'Two factor authentication protects you against stolen credentials' => '@@Autenticação de dois passos protege-o do roubo de credenciais de acesso@@', - 'Two factor successfully enabled.' => '@@@@', - 'Two-Factor Authentication' => '@@@@', - 'Two-factor auth protects you against stolen credentials' => '@@@@', - 'Two-factor authentication code' => '@@@@', - 'Two-factor authorization has been disabled.' => '@@@@', - 'Two-factor code' => '@@@@', - 'Unable to disable two-factor authorization.' => '@@@@', - 'We couldn\'t re-send the mail to confirm your address. ' => '@@@@', - 'We have sent confirmation links to both old and new email addresses. ' => '@@@@', '{0, date, MMM dd, YYYY HH:mm}' => '@@@@', + '{0} cannot be blank.' => '{0} não pode ficar vazio.', ]; diff --git a/src/User/resources/i18n/ro/usuario.php b/src/User/resources/i18n/ro/usuario.php index 38ab2bf..6abfd2b 100644 --- a/src/User/resources/i18n/ro/usuario.php +++ b/src/User/resources/i18n/ro/usuario.php @@ -17,6 +17,8 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'Rule class name' => '', + 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', 'A message has been sent to your email address. ' => '@@A fost trimis un mesaj la adresa dvs. de e-mail.@@', 'Awesome, almost there. ' => '@@Minunat, aproape gata.@@', diff --git a/src/User/resources/i18n/ru/usuario.php b/src/User/resources/i18n/ru/usuario.php index 73c12db..25d12bf 100644 --- a/src/User/resources/i18n/ru/usuario.php +++ b/src/User/resources/i18n/ru/usuario.php @@ -17,6 +17,8 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'Rule class name' => '', + 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', 'A message has been sent to your email address. ' => '@@Сообщение было отправлено на вашу электронную почту@@', 'Awesome, almost there. ' => '@@Замечательно, почти готово!@@', diff --git a/src/User/resources/i18n/th/usuario.php b/src/User/resources/i18n/th/usuario.php index 064eb08..89288fb 100644 --- a/src/User/resources/i18n/th/usuario.php +++ b/src/User/resources/i18n/th/usuario.php @@ -175,6 +175,7 @@ return [ 'Roles' => '', 'Rule' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', + 'Rule class name' => '', 'Rule name' => '', 'Rule name {0} is already in use' => '', 'Rule {0} does not exists' => '', @@ -182,6 +183,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Select rule...' => '', 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', diff --git a/src/User/resources/i18n/tr-TR/usuario.php b/src/User/resources/i18n/tr-TR/usuario.php index 064eb08..89288fb 100644 --- a/src/User/resources/i18n/tr-TR/usuario.php +++ b/src/User/resources/i18n/tr-TR/usuario.php @@ -175,6 +175,7 @@ return [ 'Roles' => '', 'Rule' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', + 'Rule class name' => '', 'Rule name' => '', 'Rule name {0} is already in use' => '', 'Rule {0} does not exists' => '', @@ -182,6 +183,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Select rule...' => '', 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', diff --git a/src/User/resources/i18n/uk/usuario.php b/src/User/resources/i18n/uk/usuario.php index 064eb08..89288fb 100644 --- a/src/User/resources/i18n/uk/usuario.php +++ b/src/User/resources/i18n/uk/usuario.php @@ -175,6 +175,7 @@ return [ 'Roles' => '', 'Rule' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', + 'Rule class name' => '', 'Rule name' => '', 'Rule name {0} is already in use' => '', 'Rule {0} does not exists' => '', @@ -182,6 +183,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Select rule...' => '', 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', diff --git a/src/User/resources/i18n/vi/usuario.php b/src/User/resources/i18n/vi/usuario.php index 064eb08..89288fb 100644 --- a/src/User/resources/i18n/vi/usuario.php +++ b/src/User/resources/i18n/vi/usuario.php @@ -175,6 +175,7 @@ return [ 'Roles' => '', 'Rule' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', + 'Rule class name' => '', 'Rule name' => '', 'Rule name {0} is already in use' => '', 'Rule {0} does not exists' => '', @@ -182,6 +183,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Select rule...' => '', 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', diff --git a/src/User/resources/i18n/zh-CN/usuario.php b/src/User/resources/i18n/zh-CN/usuario.php index 064eb08..89288fb 100644 --- a/src/User/resources/i18n/zh-CN/usuario.php +++ b/src/User/resources/i18n/zh-CN/usuario.php @@ -175,6 +175,7 @@ return [ 'Roles' => '', 'Rule' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', + 'Rule class name' => '', 'Rule name' => '', 'Rule name {0} is already in use' => '', 'Rule {0} does not exists' => '', @@ -182,6 +183,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Select rule...' => '', 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', diff --git a/src/User/resources/views/permission/_form.php b/src/User/resources/views/permission/_form.php index 21c4274..a5b559b 100644 --- a/src/User/resources/views/permission/_form.php +++ b/src/User/resources/views/permission/_form.php @@ -36,7 +36,7 @@ use yii\widgets\ActiveForm; field($model, 'rule')->widget(SelectizeDropDownList::class, [ 'items' => ArrayHelper::map(Yii::$app->getAuthManager()->getRules(), 'name', 'name'), 'options' => [ - 'prompt' => 'Select rule...' + 'prompt' => Yii::t('usuario', 'Select rule...'), ] ]) ?> diff --git a/src/User/resources/views/rule/create.php b/src/User/resources/views/rule/create.php index c2b8a54..0b33b8c 100644 --- a/src/User/resources/views/rule/create.php +++ b/src/User/resources/views/rule/create.php @@ -10,7 +10,7 @@ */ /** - * @var \Da\User\Model\Role $model + * @var \Da\User\Model\Rule $model * @var $this yii\web\View * @var $unassignedItems string[] */ diff --git a/src/User/resources/views/rule/update.php b/src/User/resources/views/rule/update.php index f12495e..2127078 100644 --- a/src/User/resources/views/rule/update.php +++ b/src/User/resources/views/rule/update.php @@ -10,7 +10,7 @@ */ /** - * @var \Da\User\Model\Role $model + * @var \Da\User\Model\Rule $model * @var $this yii\web\View * @var $unassignedItems string[] */ From 16bd4480426051df92aa6cfcf5ddc92a900a5d64 Mon Sep 17 00:00:00 2001 From: Lorenzo Milesi Date: Mon, 22 Oct 2018 18:16:00 +0200 Subject: [PATCH 13/17] Fixes & typos in it translation --- src/User/resources/i18n/it/usuario.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/User/resources/i18n/it/usuario.php b/src/User/resources/i18n/it/usuario.php index ffaeb70..3ea9d2d 100644 --- a/src/User/resources/i18n/it/usuario.php +++ b/src/User/resources/i18n/it/usuario.php @@ -17,11 +17,10 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - 'Rule class name' => '', - 'Select rule...' => '', - 'Two factor authentication protects you in case of stolen credentials' => '', + 'Rule class name' => 'Nome classe regola', + 'Select rule...' => 'Seleziona una regola...', + 'Two factor authentication protects you in case of stolen credentials' => 'L\'autenticazione a due fattura ti protegge in caso di furto di credenziali', '{0, date, MMM dd, YYYY HH:mm}' => '', - 'Two factor authentication protects you against stolen credentials' => '@@L\'autenticazione a due fattori può proteggerti dal furto di credenziali@@', '(not set)' => '(non impostato)', 'A confirmation message has been sent to your new email address' => 'È stato inviato un messaggio di conferma al tuo nuovo indirizzo email', 'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.' => 'È stato inviato un messaggio al tuo indirizzo email. Contiene un collegamento di verifica che devi aprire per completare la registrazione.', @@ -32,7 +31,7 @@ return [ 'Account details' => 'Dettagli account', 'Account details have been updated' => 'I dettagli del tuo account sono stati aggiornati', 'Account settings' => 'Impostazioni account', - 'Already registered? Sign in!' => 'Già registrato? Acccedi!', + 'Already registered? Sign in!' => 'Già registrato? Accedi!', 'An email has been sent with instructions for resetting your password' => 'È stata inviata un\'email con le istruzioni per azzerare la tua password', 'An error occurred processing your request' => 'Si è verificato un errore durante l\'elaborazione della richiesta', 'Are you sure you want to block this user?' => 'Sicuro di voler bloccare questo utente?', @@ -51,7 +50,7 @@ return [ 'Authorization item successfully created.' => 'Elemento di autorizzazione creato con successo.', 'Authorization item successfully removed.' => 'Elemento di autorizzazione eliminato con successo.', 'Authorization item successfully updated.' => 'Elemento di autorizzazione aggiornato con successo.', - 'Authorization rule has been added.' => 'Regola di autoerizzazione aggiunta.', + 'Authorization rule has been added.' => 'Regola di autorizzazione aggiunta.', 'Authorization rule has been removed.' => 'Regola di autorizzazione rimossa.', 'Authorization rule has been updated.' => 'Regola di autorizzazione modificata.', 'Awesome, almost there. Now you need to click the confirmation link sent to your new email address.' => 'Fantastico, ci siamo quasi. Ora devi solo visitare il collegamento di conferma che è stato inviato al tuo nuovo indirizzo email.', From eaa6bf967fc5f8ceb11b28647181af2affcc4a0b Mon Sep 17 00:00:00 2001 From: bscheshirwork Date: Tue, 23 Oct 2018 12:05:53 +0300 Subject: [PATCH 14/17] add Closure support for fromEmail (#274) --- CHANGELOG.md | 1 + docs/installation/mailer.md | 51 ++++++++++++++++++++++++++++++-- src/User/Factory/MailFactory.php | 5 +++- 3 files changed, 54 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdfd888..fe940d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - Fix #252: Delete check for unexpected property `allowPasswordRecovery` for resend email by admin (bscheshirwork) - Fix #254: Rename `GDPR` properties to `lowerCamelCase` style (bscheshirwork) - Fix #258: Rename `GDPR` delete action to `lowerCamelCase`/`dash` style (bscheshirwork) + - Fix #271: Add closure support for `from` email address; Change default sender to `supportEmail` (bscheshirwork) - Fix #276: Fix missing translatable strings ## 1.1.4 - February 19, 2018 diff --git a/docs/installation/mailer.md b/docs/installation/mailer.md index b9db47e..dd91bb3 100644 --- a/docs/installation/mailer.md +++ b/docs/installation/mailer.md @@ -4,7 +4,7 @@ Mailer The way this module sends its emails is throughout the [`Mailer`](http://www.yiiframework.com/doc-2.0/guide-tutorial-mailing.html) component of Yii 2. Please, follow Yii 2's guidelines to set it up. -Nevertheless, you have to configure the following attribute of the module: `mailParams`. the following is its default +Nevertheless, you wish to configure the following attribute of the module: `mailParams`. the following is its default values: ```php @@ -17,7 +17,23 @@ values: ] ``` -Actually, the only thing required is the `fromEmail` value. If you look at the code of `Da\User\Factory\MailFactory.php` +Actually, the only thing required is the `fromEmail` value. +If you want to set it the same as supportEmail from your config params (like yii2-app-advanced template): +```php + ... + 'modules' => [ + 'user' => [ + 'class' => Da\User\Module::class, + 'mailParams' => [ + 'fromEmail' => function() { + return [Yii::$app->params['supportEmail'] => Yii::t('app', '{0} robot', Yii::$app->name)]; + } + ], + ], + ], + ... +``` +If you look at the code of `Da\User\Factory\MailFactory.php` you will easily find the reason why: ```php @@ -55,4 +71,35 @@ public function run() } ``` +> Tip: You can separate `from` by type of mailer of this module: +```php + ... + 'modules' => [ + 'user' => [ + 'class' => Da\User\Module::class, + 'mailParams' => [ + 'fromEmail' => + /** + * @param $type string The type of mail + * Da\User\Event\MailEvent::TYPE_WELCOME|Da\User\Event\MailEvent::TYPE_RECOVERY| + * Da\User\Event\MailEvent::TYPE_CONFIRM|Da\User\Event\MailEvent::TYPE_RECONFIRM + * @return array + */ + function ($type) { + switch ($type) { + case Da\User\Event\MailEvent::TYPE_WELCOME: + return [Yii::$app->params['supportEmail'] => Yii::t('app', '{0} welcome!', Yii::$app->name)]; + break; + default: + return [Yii::$app->params['supportEmail'] => Yii::t('app', '{0} robot', Yii::$app->name)]; + break; + } + }, + ], + ], + ], + ... +``` + + © [2amigos](http://www.2amigos.us/) 2013-2017 diff --git a/src/User/Factory/MailFactory.php b/src/User/Factory/MailFactory.php index 13fd3e5..ba81bca 100644 --- a/src/User/Factory/MailFactory.php +++ b/src/User/Factory/MailFactory.php @@ -118,7 +118,7 @@ class MailFactory * Builds a MailerService. * * @param string $type - * @param string $from + * @param string|array|\Closure $from * @param string $to * @param string $subject * @param string $view @@ -130,6 +130,9 @@ class MailFactory */ public static function makeMailerService($type, $from, $to, $subject, $view, $params = []) { + if ($from instanceof \Closure){ + $from = $from($type); + } /** @noinspection PhpIncompatibleReturnTypeInspection */ return Yii::$container->get( MailService::class, From adf9321db80273edc3ee5457218c86bedaee595a Mon Sep 17 00:00:00 2001 From: bscheshirwork Date: Tue, 23 Oct 2018 13:10:33 +0300 Subject: [PATCH 15/17] Always show a feedback when recovering password (#249) Even if email doesn't exist --- CHANGELOG.md | 1 + src/User/Controller/RecoveryController.php | 16 ++++++++-------- src/User/Service/PasswordRecoveryService.php | 14 +++++++------- src/User/resources/i18n/ca/usuario.php | 3 ++- src/User/resources/i18n/da/usuario.php | 3 ++- src/User/resources/i18n/de-DU/usuario.php | 3 ++- src/User/resources/i18n/de/usuario.php | 3 ++- src/User/resources/i18n/es/usuario.php | 3 ++- src/User/resources/i18n/et/usuario.php | 3 ++- src/User/resources/i18n/fa-IR/usuario.php | 3 ++- src/User/resources/i18n/fi/usuario.php | 3 ++- src/User/resources/i18n/fr/usuario.php | 3 ++- src/User/resources/i18n/hr/usuario.php | 3 ++- src/User/resources/i18n/hu/usuario.php | 3 ++- src/User/resources/i18n/it/usuario.php | 9 +++++---- src/User/resources/i18n/kk/usuario.php | 3 ++- src/User/resources/i18n/lt/usuario.php | 3 ++- src/User/resources/i18n/nl/usuario.php | 3 ++- src/User/resources/i18n/pl/usuario.php | 3 ++- src/User/resources/i18n/pt-BR/usuario.php | 3 ++- src/User/resources/i18n/pt-PT/usuario.php | 3 ++- src/User/resources/i18n/ro/usuario.php | 3 ++- src/User/resources/i18n/ru/usuario.php | 9 +++++---- src/User/resources/i18n/th/usuario.php | 3 ++- src/User/resources/i18n/tr-TR/usuario.php | 3 ++- src/User/resources/i18n/uk/usuario.php | 3 ++- src/User/resources/i18n/vi/usuario.php | 3 ++- src/User/resources/i18n/zh-CN/usuario.php | 3 ++- tests/functional/RecoveryCept.php | 11 +++++++++-- 29 files changed, 81 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe940d2..106b506 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - Fix #258: Rename `GDPR` delete action to `lowerCamelCase`/`dash` style (bscheshirwork) - Fix #271: Add closure support for `from` email address; Change default sender to `supportEmail` (bscheshirwork) - Fix #276: Fix missing translatable strings + - Enh #249: Show message `email send if possible` any time on reset password request (bscheshirwork) ## 1.1.4 - February 19, 2018 - Enh: Check enableEmailConfirmation on registration (faenir) diff --git a/src/User/Controller/RecoveryController.php b/src/User/Controller/RecoveryController.php index 33c19ee..a935669 100644 --- a/src/User/Controller/RecoveryController.php +++ b/src/User/Controller/RecoveryController.php @@ -104,15 +104,15 @@ class RecoveryController extends Controller if ($this->make(PasswordRecoveryService::class, [$form->email, $mailService])->run()) { $this->trigger(FormEvent::EVENT_AFTER_REQUEST, $event); - - return $this->render( - '/shared/message', - [ - 'title' => Yii::t('usuario', 'Recovery message sent'), - 'module' => $this->module, - ] - ); } + + return $this->render( + '/shared/message', + [ + 'title' => Yii::t('usuario', 'Recovery message sent'), + 'module' => $this->module, + ] + ); } return $this->render('request', ['model' => $form]); diff --git a/src/User/Service/PasswordRecoveryService.php b/src/User/Service/PasswordRecoveryService.php index 032257e..9d6e2db 100644 --- a/src/User/Service/PasswordRecoveryService.php +++ b/src/User/Service/PasswordRecoveryService.php @@ -41,6 +41,13 @@ class PasswordRecoveryService implements ServiceInterface public function run() { try { + if ($this->getModule()->enableFlashMessages == true) { + Yii::$app->session->setFlash( + 'info', + Yii::t('usuario', 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.', ['email' => $this->email, 'appName' => Yii::$app->name]) + ); + } + /** @var User $user */ $user = $this->query->whereEmail($this->email)->one(); @@ -60,13 +67,6 @@ class PasswordRecoveryService implements ServiceInterface return false; } - if ($this->getModule()->enableFlashMessages == true) { - Yii::$app->session->setFlash( - 'info', - Yii::t('usuario', 'An email has been sent with instructions for resetting your password') - ); - } - return true; } catch (Exception $e) { Yii::error($e->getMessage(), 'usuario'); diff --git a/src/User/resources/i18n/ca/usuario.php b/src/User/resources/i18n/ca/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/ca/usuario.php +++ b/src/User/resources/i18n/ca/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/da/usuario.php b/src/User/resources/i18n/da/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/da/usuario.php +++ b/src/User/resources/i18n/da/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/de-DU/usuario.php b/src/User/resources/i18n/de-DU/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/de-DU/usuario.php +++ b/src/User/resources/i18n/de-DU/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/de/usuario.php b/src/User/resources/i18n/de/usuario.php index bba81ec..fc2db0f 100644 --- a/src/User/resources/i18n/de/usuario.php +++ b/src/User/resources/i18n/de/usuario.php @@ -17,6 +17,7 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Are you sure you wish the user to change their password at next login?' => '', 'Back to privacy settings' => '', 'Data processing consent' => '', @@ -57,6 +58,7 @@ return [ 'Your personal information has been removed' => '', 'privacy policy' => '', 'A message has been sent to your email address. ' => '@@Eine Nachricht wurde an ihre E-Mail Adresse versandt@@', + 'An email has been sent with instructions for resetting your password' => '@@Eine E-Mail mit den weiteren Schritten zur Passwort-Wiederherstellung wurde versandt@@', 'Awesome, almost there. ' => '@@Fast geschafft. @@', 'Class "{0}" does not exist' => '@@Klasse "{0}" existiert nicht@@', 'Disable Two-Factor Auth' => '@@Zweifaktor-Authentifizierung deaktivieren@@', @@ -92,7 +94,6 @@ return [ 'Account details have been updated' => 'Kontodetails gespeichert', 'Account settings' => 'Kontoeinstellungen', 'Already registered? Sign in!' => 'Bereits registriert? Zur Anmeldung!', - 'An email has been sent with instructions for resetting your password' => 'Eine E-Mail mit den weiteren Schritten zur Passwort-Wiederherstellung wurde versandt', 'An error occurred processing your request' => 'Es ist ein Fehler aufgetreten', 'Are you sure you want to block this user?' => 'Sind Sie sicher, dass Sie diesen Benutzer blockieren wollen?', 'Are you sure you want to confirm this user?' => 'Sind Sie sicher, dass Sie diesen Benutzer bestätigen wollen?', diff --git a/src/User/resources/i18n/es/usuario.php b/src/User/resources/i18n/es/usuario.php index db44f06..34b2f4a 100644 --- a/src/User/resources/i18n/es/usuario.php +++ b/src/User/resources/i18n/es/usuario.php @@ -17,10 +17,12 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Rule class name' => '', 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', '{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@@', 'Two factor authentication protects you against stolen credentials' => '@@La autenticación de dos factores le protege del robo de credenciales@@', '(not set)' => '(sin establecer)', 'A confirmation message has been sent to your new email address' => 'Se ha enviado un mensaje de confirmación a su nueva dirección de correo electrónico', @@ -33,7 +35,6 @@ return [ 'Account details have been updated' => 'Se han actualizado los detalles de la cuenta', 'Account settings' => 'Configuración de la cuenta', 'Already registered? Sign in!' => '¿Ya está registrado? ¡Inicie sesión!', - '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', 'An error occurred processing your request' => 'Se ha producido un error al procesar su solicitud', 'Are you sure you want to block this user?' => '¿Seguro que desea bloquear a este usuario?', 'Are you sure you want to confirm this user?' => '¿Seguro que desea confirmar a este usuario?', diff --git a/src/User/resources/i18n/et/usuario.php b/src/User/resources/i18n/et/usuario.php index 9fd8a3b..5e0cf30 100644 --- a/src/User/resources/i18n/et/usuario.php +++ b/src/User/resources/i18n/et/usuario.php @@ -17,6 +17,7 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Authentication rule class {0} can not be instantiated' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', 'Rule class name' => '', @@ -25,6 +26,7 @@ return [ 'Yandex' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', '{0, date, MMMM dd, YYYY HH:mm}' => '', + 'An email has been sent with instructions for resetting your password' => '@@Saatsime sulle e-kirja juhendiga, kuidas saad oma parooli uuendada@@', '(not set)' => '(määramata)', 'A confirmation message has been sent to your new email address' => 'Saatsime sinu uuele e-maili aadressile kinnituskirja', 'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.' => 'Saatsime sulle kinnituseks e-kirja. Registreerumise kinnitamiseks pead klikkma saadetud kirjas olevale lingile.', @@ -36,7 +38,6 @@ return [ 'Account details have been updated' => 'Konto andmed on uuendatud', 'Account settings' => 'Konto seaded', 'Already registered? Sign in!' => 'Oled registreerunud? Logi sisse!', - 'An email has been sent with instructions for resetting your password' => 'Saatsime sulle e-kirja juhendiga, kuidas saad oma parooli uuendada', 'An error occurred processing your request' => 'Päringu protsessimisel tekkis viga', 'Are you sure you want to block this user?' => 'Oled kindel, et tahad selle kasutaja blokeerid?', 'Are you sure you want to confirm this user?' => 'Oled kindel, et tahad selle kasutaja kinnitada?', diff --git a/src/User/resources/i18n/fa-IR/usuario.php b/src/User/resources/i18n/fa-IR/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/fa-IR/usuario.php +++ b/src/User/resources/i18n/fa-IR/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/fi/usuario.php b/src/User/resources/i18n/fi/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/fi/usuario.php +++ b/src/User/resources/i18n/fi/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/fr/usuario.php b/src/User/resources/i18n/fr/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/fr/usuario.php +++ b/src/User/resources/i18n/fr/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/hr/usuario.php b/src/User/resources/i18n/hr/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/hr/usuario.php +++ b/src/User/resources/i18n/hr/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/hu/usuario.php b/src/User/resources/i18n/hu/usuario.php index b6e648a..5ba1f36 100644 --- a/src/User/resources/i18n/hu/usuario.php +++ b/src/User/resources/i18n/hu/usuario.php @@ -17,10 +17,12 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Rule class name' => '', 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', '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.@@', 'Disable Two-Factor Auth' => '@@Letiltja a kétütemű hitelesítést@@', 'Enable Two-factor auth' => '@@Engedélyezze a kétütemű hitelesítést@@', @@ -50,7 +52,6 @@ return [ 'Account details have been updated' => 'A fiókadatok frissítve lettek', 'Account settings' => 'Fiók beállítások', 'Already registered? Sign in!' => 'Már regisztrált? Bejelentkezés!', - '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', 'An error occurred processing your request' => 'Hiba történt a kérelem feldolgozása során', 'Are you sure you want to block this user?' => 'Biztos benne, hogy letiltja ezt a felhasználót?', 'Are you sure you want to confirm this user?' => 'Biztosan megerősíted ezt a felhasználót?', diff --git a/src/User/resources/i18n/it/usuario.php b/src/User/resources/i18n/it/usuario.php index 3ea9d2d..37ed5f5 100644 --- a/src/User/resources/i18n/it/usuario.php +++ b/src/User/resources/i18n/it/usuario.php @@ -17,10 +17,9 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - 'Rule class name' => 'Nome classe regola', - 'Select rule...' => 'Seleziona una regola...', - 'Two factor authentication protects you in case of stolen credentials' => 'L\'autenticazione a due fattura ti protegge in caso di furto di credenziali', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', + 'An email has been sent with instructions for resetting your password' => '@@È stata inviata un\'email con le istruzioni per azzerare la tua password@@', '(not set)' => '(non impostato)', 'A confirmation message has been sent to your new email address' => 'È stato inviato un messaggio di conferma al tuo nuovo indirizzo email', 'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.' => 'È stato inviato un messaggio al tuo indirizzo email. Contiene un collegamento di verifica che devi aprire per completare la registrazione.', @@ -32,7 +31,6 @@ return [ 'Account details have been updated' => 'I dettagli del tuo account sono stati aggiornati', 'Account settings' => 'Impostazioni account', 'Already registered? Sign in!' => 'Già registrato? Accedi!', - 'An email has been sent with instructions for resetting your password' => 'È stata inviata un\'email con le istruzioni per azzerare la tua password', 'An error occurred processing your request' => 'Si è verificato un errore durante l\'elaborazione della richiesta', 'Are you sure you want to block this user?' => 'Sicuro di voler bloccare questo utente?', 'Are you sure you want to confirm this user?' => 'Sicuro di voler confermare questo utente?', @@ -179,6 +177,7 @@ return [ 'Roles' => 'Ruoli', 'Rule' => 'ruolo', 'Rule class must extend "yii\\rbac\\Rule".' => 'La classe della regola deve estendere "yii\\rbac\\Rule".', + 'Rule class name' => 'Nome classe regola', 'Rule name' => 'Nome regola', 'Rule name {0} is already in use' => 'Regola {0} già in uso', 'Rule {0} does not exists' => 'La regola {0} non esiste', @@ -186,6 +185,7 @@ return [ 'Rules' => 'Regole', 'Save' => 'Salva', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => 'Scansiona il codice QR con l\'applicazione Google Authenticator, poi inserisci il codice temporaneo nel riquadro ed invia.', + 'Select rule...' => 'Seleziona una regola...', 'Send password recovery email' => 'Invia email di recupero password', 'Sign in' => 'Accedi', 'Sign up' => 'Registrati', @@ -208,6 +208,7 @@ return [ 'Two Factor Authentication (2FA)' => 'Autenticazione a due fattori (2FA)', 'Two factor authentication code' => 'Codice di autenticazione a due fattori', 'Two factor authentication has been disabled.' => 'Autenticazione a due fattori disabilitata.', + 'Two factor authentication protects you in case of stolen credentials' => 'L\'autenticazione a due fattura ti protegge in caso di furto di credenziali', 'Two factor authentication successfully enabled.' => 'Autenticazione a due fattori abilitata con successo.', 'Unable to confirm user. Please, try again.' => 'Impossibile confermare l\'utente, per favore ritenta.', 'Unable to create an account.' => 'Impossibile creare l\'account.', diff --git a/src/User/resources/i18n/kk/usuario.php b/src/User/resources/i18n/kk/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/kk/usuario.php +++ b/src/User/resources/i18n/kk/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/lt/usuario.php b/src/User/resources/i18n/lt/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/lt/usuario.php +++ b/src/User/resources/i18n/lt/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/nl/usuario.php b/src/User/resources/i18n/nl/usuario.php index 50ad205..7f6f783 100644 --- a/src/User/resources/i18n/nl/usuario.php +++ b/src/User/resources/i18n/nl/usuario.php @@ -17,10 +17,12 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Rule class name' => '', 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', '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.@@', 'Class "{0}" does not exist' => '@@Class "{0} bestaat niet@@', 'Disable Two-Factor Auth' => '@@Tweetraps authenticatie uitschakelen@@', @@ -56,7 +58,6 @@ return [ 'Account details have been updated' => 'Account details werden geupdate', 'Account settings' => 'Account instellingen', 'Already registered? Sign in!' => 'Reeds geregistreerd? Log in!', - 'An email has been sent with instructions for resetting your password' => 'Er werd een email verstuurd met instructies om jouw wachtwoord te resetten', 'An error occurred processing your request' => 'Een error trad op terwijl we uw aanvraag verwerkten', 'Are you sure you want to block this user?' => 'Ben je zeker dat je deze gebruiker wil blokkeren?', 'Are you sure you want to confirm this user?' => 'Ben je zeker dat je deze gebruiker wil bevestigen?', diff --git a/src/User/resources/i18n/pl/usuario.php b/src/User/resources/i18n/pl/usuario.php index 89a9b42..8803782 100644 --- a/src/User/resources/i18n/pl/usuario.php +++ b/src/User/resources/i18n/pl/usuario.php @@ -17,9 +17,11 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Rule class name' => '', 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', + '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@@', 'I aggree processing of my personal data and the use of cookies @@ -48,7 +50,6 @@ return [ 'Account details have been updated' => 'Szczegóły konta zostały zaktualizowane', 'Account settings' => 'Ustawienia konta', 'Already registered? Sign in!' => 'Masz już konto? Zaloguj się!', - 'An email has been sent with instructions for resetting your password' => 'Email z instrukcją resetowania hasła został wysłany', 'An error occurred processing your request' => 'Wystąpił błąd podczas przetwarzania Twojego zapytania', 'Are you sure you want to block this user?' => 'Czy na pewno chcesz zablokować tego użytkownika?', 'Are you sure you want to confirm this user?' => 'Czy na pewno chcesz aktywować tego użytkownika?', diff --git a/src/User/resources/i18n/pt-BR/usuario.php b/src/User/resources/i18n/pt-BR/usuario.php index 61ef7e9..be9b247 100644 --- a/src/User/resources/i18n/pt-BR/usuario.php +++ b/src/User/resources/i18n/pt-BR/usuario.php @@ -17,10 +17,12 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Rule class name' => '', 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', '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á.@@', 'Class "{0}" does not exist' => '@@A classe "{0}" não existe@@', 'Disable Two-Factor Auth' => '@@Desabilitar autenticação em dois fatores@@', @@ -56,7 +58,6 @@ return [ 'Account details have been updated' => 'Os detalhes da conta foram atualizados', 'Account settings' => 'Configurações da conta', 'Already registered? Sign in!' => 'Já registrado? Acesse!', - 'An email has been sent with instructions for resetting your password' => 'Um e-mail foi enviado com instruções para redefinir sua senha', 'An error occurred processing your request' => 'Ocorreu um erro ao processar seu pedido', 'Are you sure you want to block this user?' => 'Tem certeza de que deseja bloquear esse usuário?', 'Are you sure you want to confirm this user?' => 'Tem certeza de que deseja confirmar esse usuário?', diff --git a/src/User/resources/i18n/pt-PT/usuario.php b/src/User/resources/i18n/pt-PT/usuario.php index b3ae11f..8d6ee7d 100644 --- a/src/User/resources/i18n/pt-PT/usuario.php +++ b/src/User/resources/i18n/pt-PT/usuario.php @@ -17,6 +17,7 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Awesome, almost there. Now you need to click the confirmation link sent to your new email address.' => '', 'Awesome, almost there. Now you need to click the confirmation link sent to your old email address.' => '', 'Children' => '', @@ -33,6 +34,7 @@ return [ 'Yandex' => '', '{0, date, MMMM dd, YYYY HH:mm}' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@Foi enviado um email com as instruções para restaurar a sua password@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', @@ -68,7 +70,6 @@ return [ 'Account details have been updated' => 'Detalhes da conta foram atualizados', 'Account settings' => 'Definições da conta', 'Already registered? Sign in!' => 'Já está registado? Entre na sua conta!', - 'An email has been sent with instructions for resetting your password' => 'Foi enviado um email com as instruções para restaurar a sua password', 'An error occurred processing your request' => 'Ocorreu um erro ao processar o seu pedido', 'Are you sure you want to block this user?' => 'Tem a certeza que pretende bloquear este utilizador?', 'Are you sure you want to confirm this user?' => 'Tem a certeza que pretende confirmar este utilizador?', diff --git a/src/User/resources/i18n/ro/usuario.php b/src/User/resources/i18n/ro/usuario.php index 6abfd2b..dbb0079 100644 --- a/src/User/resources/i18n/ro/usuario.php +++ b/src/User/resources/i18n/ro/usuario.php @@ -17,10 +17,12 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Rule class name' => '', 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', '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.@@', 'Disable Two-Factor Auth' => '@@Dezactivați autentificarea cu două factori@@', 'Enable Two-factor auth' => '@@Activați Auth@@', @@ -52,7 +54,6 @@ return [ 'Account details have been updated' => 'Detaliile contului au fost actualizate', 'Account settings' => 'Setările contului', 'Already registered? Sign in!' => 'Deja înregistrat? Conectare!', - 'An email has been sent with instructions for resetting your password' => 'A fost trimis un e-mail cu instrucțiuni pentru resetarea parolei', 'An error occurred processing your request' => 'A apărut o eroare la procesarea solicitării dvs.', 'Are you sure you want to block this user?' => 'Sigur doriți să blocați acest utilizator?', 'Are you sure you want to confirm this user?' => 'Sigur doriți să confirmați acest utilizator?', diff --git a/src/User/resources/i18n/ru/usuario.php b/src/User/resources/i18n/ru/usuario.php index 25d12bf..2adbef1 100644 --- a/src/User/resources/i18n/ru/usuario.php +++ b/src/User/resources/i18n/ru/usuario.php @@ -17,10 +17,12 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - 'Rule class name' => '', - 'Select rule...' => '', - 'Two factor authentication protects you in case of stolen credentials' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => 'Письмо с инструкциями по созданию нового пароля было выслано на {email}, в случае если данный адрес связан с {appName} аккаунтом', + 'Rule class name' => 'Имя класса правила', + 'Select rule...' => 'Выберите правило...', + 'Two factor authentication protects you in case of stolen credentials' => 'Двухфакторная аутентификация защищает вас в случае кражи учетных данных', 'A message has been sent to your email address. ' => '@@Сообщение было отправлено на вашу электронную почту@@', + 'An email has been sent with instructions for resetting your password' => '@@Вам отправлено письмо с инструкциями по смене пароля@@', 'Awesome, almost there. ' => '@@Замечательно, почти готово!@@', 'Class "{0}" does not exist' => '@@Класс "{0}" не найден@@', 'Disable Two-Factor Auth' => '@@Отключить двухфакторную авторизацию@@', @@ -54,7 +56,6 @@ return [ 'Account details have been updated' => 'Аккаунт был обновлен', 'Account settings' => 'Настройки аккаунта', 'Already registered? Sign in!' => 'Уже зарегистрированы? Войдите!', - 'An email has been sent with instructions for resetting your password' => 'Вам отправлено письмо с инструкциями по смене пароля', 'An error occurred processing your request' => 'Во время выполнения запроса произошла ошибка', 'Are you sure you want to block this user?' => 'Вы действительно хотите заблокировать этого пользователя?', 'Are you sure you want to confirm this user?' => 'Вы уверены, что хотите подтвердить аккаунт пользователя?', diff --git a/src/User/resources/i18n/th/usuario.php b/src/User/resources/i18n/th/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/th/usuario.php +++ b/src/User/resources/i18n/th/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/tr-TR/usuario.php b/src/User/resources/i18n/tr-TR/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/tr-TR/usuario.php +++ b/src/User/resources/i18n/tr-TR/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/uk/usuario.php b/src/User/resources/i18n/uk/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/uk/usuario.php +++ b/src/User/resources/i18n/uk/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/vi/usuario.php b/src/User/resources/i18n/vi/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/vi/usuario.php +++ b/src/User/resources/i18n/vi/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/zh-CN/usuario.php b/src/User/resources/i18n/zh-CN/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/zh-CN/usuario.php +++ b/src/User/resources/i18n/zh-CN/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/tests/functional/RecoveryCept.php b/tests/functional/RecoveryCept.php index 879b39a..3484aaf 100644 --- a/tests/functional/RecoveryCept.php +++ b/tests/functional/RecoveryCept.php @@ -20,7 +20,14 @@ $user = $I->grabFixture('user', 'unconfirmed'); $I->fillField('#recoveryform-email', $user->email); $I->click('Continue'); -$I->see('An email has been sent with instructions for resetting your password'); +$I->see('An email with instructions to create a new password has been sent to ' . $user->email); // ... truncate full message text by email + +$I->amGoingTo('try to request recovery token for non-existing email'); +$I->amOnRoute('/user/recovery/request'); +$I->fillField('#recoveryform-email', 'any@email.com'); +$I->click('Continue'); + +$I->see('An email with instructions to create a new password has been sent to ' . 'any@email.com'); $I->amGoingTo('try to request recovery token'); $I->amOnRoute('/user/recovery/request'); @@ -28,7 +35,7 @@ $user = $I->grabFixture('user', 'user'); $I->fillField('#recoveryform-email', $user->email); $I->click('Continue'); -$I->see('An email has been sent with instructions for resetting your password'); +$I->see('An email with instructions to create a new password has been sent to ' . $user->email); $user = $I->grabRecord(User::className(), ['email' => $user->email]); $token = $I->grabRecord(Token::className(), ['user_id' => $user->id, 'type' => Token::TYPE_RECOVERY]); /** @var yii\swiftmailer\Message $message */ From 5ef46729d0f50c844e3fb53f08312568c81d88c4 Mon Sep 17 00:00:00 2001 From: Lorenzo Milesi Date: Tue, 23 Oct 2018 12:29:44 +0200 Subject: [PATCH 16/17] Translatable form. Fix #283 --- src/User/Form/GdprDeleteForm.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/User/Form/GdprDeleteForm.php b/src/User/Form/GdprDeleteForm.php index 926c767..427376c 100644 --- a/src/User/Form/GdprDeleteForm.php +++ b/src/User/Form/GdprDeleteForm.php @@ -82,5 +82,10 @@ class GdprDeleteForm extends Model return $this->user; } - + public function attributeLabels() + { + return [ + 'password' => Yii::t('usuario', 'Password'), + ]; + } } From 07699f4197d3a92366e4e9c9db6883d8c3209b39 Mon Sep 17 00:00:00 2001 From: Lorenzo Milesi Date: Wed, 24 Oct 2018 08:06:38 +0200 Subject: [PATCH 17/17] Allow customization of controller namespace #282 --- CHANGELOG.md | 1 + docs/installation/configuration-options.md | 8 ++++++++ src/User/Bootstrap.php | 4 ++-- src/User/Module.php | 8 ++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 106b506..e940b95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ - Fix #271: Add closure support for `from` email address; Change default sender to `supportEmail` (bscheshirwork) - Fix #276: Fix missing translatable strings - Enh #249: Show message `email send if possible` any time on reset password request (bscheshirwork) + - Enh #282: Allows customization of controller namespace (maxxer) ## 1.1.4 - February 19, 2018 - Enh: Check enableEmailConfirmation on registration (faenir) diff --git a/docs/installation/configuration-options.md b/docs/installation/configuration-options.md index ba43f70..1ff98c7 100644 --- a/docs/installation/configuration-options.md +++ b/docs/installation/configuration-options.md @@ -162,6 +162,14 @@ protected against brute-force attacks, set it to the highest value that is toler taken to compute the hash doubles for every increment by one of `$blowfishCost`. +#### consoleControllerNamespace (type: `string`, default: `Da\User\Command`) + +Allows customization of the console application controller namespace for the module. + +#### controllerNamespace (type: `string`, default: `Da\User\Controller`) + +Allows customization of the web application controller namespace for the module. + #### classMap (type: `array`, default: `[]`) Configures the definitions of the classes as they have to be override. For more information see diff --git a/src/User/Bootstrap.php b/src/User/Bootstrap.php index 4ad380f..90ca741 100644 --- a/src/User/Bootstrap.php +++ b/src/User/Bootstrap.php @@ -281,7 +281,7 @@ class Bootstrap implements BootstrapInterface */ protected function initConsoleCommands(ConsoleApplication $app) { - $app->getModule('user')->controllerNamespace = 'Da\User\Command'; + $app->getModule('user')->controllerNamespace = $app->getModule('user')->consoleControllerNamespace; } /** @@ -291,7 +291,7 @@ class Bootstrap implements BootstrapInterface */ protected function initControllerNamespace(WebApplication $app) { - $app->getModule('user')->controllerNamespace = 'Da\User\Controller'; + $app->getModule('user')->controllerNamespace = $app->getModule('user')->controllerNamespace; $app->getModule('user')->setViewPath('@Da/User/resources/views'); } diff --git a/src/User/Module.php b/src/User/Module.php index 3c2ab48..e71c65a 100644 --- a/src/User/Module.php +++ b/src/User/Module.php @@ -145,6 +145,14 @@ class Module extends BaseModule * to compute the hash doubles for every increment by one of $cost */ public $blowfishCost = 10; + /** + * @var string Web controller namespace + */ + public $controllerNamespace = 'Da\User\Controller'; + /** + * @var string Console controller namespace + */ + public $consoleControllerNamespace = 'Da\User\Command'; /** * @var array the class map. How the container should load specific classes * @see Bootstrap::buildClassMap() for more details