diff --git a/.gitignore b/.gitignore index ffa3456..1f8808c 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ codeception.yml # composer composer.lock + diff --git a/.php_cs.dist b/.php_cs.dist index cf0a9f1..a9d6959 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -15,6 +15,7 @@ $finder = PhpCsFixer\Finder::create() 'temp', 'tests', 'vendor', + 'src/User/resources' ]) ->in(__DIR__); diff --git a/CHANGELOG.md b/CHANGELOG.md index 66e6cc0..04e3992 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,46 @@ # CHANGELOG -## 1.0.14 - Work in progress +## 1.1.5 - Work in progress + - Enh #184: Add `last-login-ip` capture capability (kartik-v) + - Enh: Changed `View::render()` calls in views to use absolute paths (ajmedway) + - Fix #169: Fix bug in ReCaptchaComponent (BuTaMuH) + - Fix #168: Fix spelling in russian language (EvgenyOrekhov) + +## 1.1.4 - February 19, 2018 +- Enh: Check enableEmailConfirmation on registration (faenir) +- Fix #154: Fix DateTime constructor with Unix timestamps (tonydspaniard) + +## 1.1.2-3 - February 9, 2018 +- Bug: Bugfix for Model events UserEvent::EVENT_BEFORE_CONFIRMATION and UserEvent::EVENT_AFTER_CONFIRMATION (ajmedway) +- Bug: Bugfix for Model events UserEvent::EVENT_BEFORE_CREATE and UserEvent::EVENT_AFTER_CREATE (ajmedway) +- Enh #137: Added the ability to make `enableAutologin` configurable (pappfer) +- Enh #135: Added Estonian translation (tonisormisson) +- Bug #133: Fix user search returning no results in admin page (phiurs) +- Bug #125: Fix validation in non-ajax requests (faenir) +- Bug #122: Fix wrong email message for email address change (liviuk2) +- Bug #102: Implemented password expiration feature (maxxer) +- Enh #143: Introduced "conflict" configuration in composer.json (maxxer) +- Enh #145: Allowed the `+` sign in username (maxxer) +- Bug #9: Documentation about migration from Dektrium tools (maxxer) +- Bug #110: Honor `enableFlashMessages` in `PasswordRecoveryService` (maxxer) + +## 1.1.1 - November 27, 2017 +- Bug #115: Convert client_id to string because pgsql fail with type convertion (Dezinger) +- Bug #119: Security fix: add AccessControl to RuleController (Dezinger) +- Enh #120: 2FA i18n russian translation (Dezinger) +- Bug #111: Fix migration for PostgreSQL DBMS (MKiselev) +- Bug #106: Correct exception value returned in `MailEvent::getException` (kartik-v) +- Enh #99: Added German translation (jkmssoft) +- Enh #100: Added pt-BR translation (gugoan) +- Enh #105: Consolidate 2fa messages (maxxer) +- Fix #108: Use main logger app (tonydspaniard) +- Enh #109: Make use of better classes names (tonydspaniard) + +## 1.1.0 - October 22, 2017 +- Enh #91: Documentation for Mail events (kartik-v) +- Enh #79: Enhancements to Mailer exception handling and events (kartik-v) +- Fix #85: External links should open in a new tab|window (eseperio) +- Enh #23: Provide administrator with an option to reset user password (tonydspaniard) - Enh #55: Provide google recaptcha mechanism (tonydspaniard) - Fix #20: Allow the assignment of a role on user creation via console (tonydspaniard) - Fix #59: Add instructions to add rbac migration path (tonydspaniard) @@ -13,6 +53,9 @@ - Enh #61: Updated Russian translation (faenir) - Enh #70: Allow permission-permission parent-child relationship (Philosoft) - Enh #82: Updated Polish translation (bizley) +- Enh #83: Updated Russian translation (Katenkka) +- Fix #87: Fix wrong documentation info (tonydspaniard) +- Fix #86: Fix view location bug (tonydspaniard) ## 1.0.13 - August 12, 2017 - Fix #49: Fix wrong call of method make() for set attributes (MKiselev) diff --git a/README.md b/README.md index f41cca8..3bdb3db 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,6 @@ In fact, we have used some of its processes, commands, views, and some of its at modules and make it easier for our developers to swap from [Dektrium's](https://dektrium.com) modules to our own. > [![2amigOS!](https://s.gravatar.com/avatar/55363394d72945ff7ed312556ec041e0?s=80)](http://www.2amigos.us) -> Custom Software | Web & Mobile Software Development +> Beyond Software > [www.2amigos.us](http://www.2amigos.us) diff --git a/composer.json b/composer.json index 8280b34..ad582b5 100644 --- a/composer.json +++ b/composer.json @@ -89,6 +89,10 @@ "pattern-skip-version": "(-build|-patch)" } }, + "conflict": { + "dektrium/yii2-rbac": "*", + "dektrium/yii2-user": "*" + }, "extra": { "bootstrap": "Da\\User\\Bootstrap" } diff --git a/docs/events/mail-events.md b/docs/events/mail-events.md new file mode 100644 index 0000000..b6efa03 --- /dev/null +++ b/docs/events/mail-events.md @@ -0,0 +1,101 @@ +Mail Events +=========== + +The following is the list of the mail events and where they happen: + +On Models +--------- + +- **User** + - `MailEvent::EVENT_BEFORE_SEND_MAIL`: triggered before a mail is sent + - `MailEvent::EVENT_AFTER_SEND_MAIL`: triggered after a mail is sent + +Mail Event Getter Methods +------------------------- + +Each of the events above would receive the following properties via getter methods: + +1. `getType()`: _string_, returns the type of mailer sent. The following mailer types will be returned: + - `MailEvent::TYPE_WELCOME` or `'welcome'`: when a welcome mailer is sent on user creation or registration signup. + - `MailEvent::TYPE_RECOVERY` or `'recovery'`: when a password reset / recovery mailer is sent. + - `MailEvent::TYPE_CONFIRM` or `'confirm'`: when an account confirmation mailer is sent. + - `MailEvent::TYPE_RECONFIRM` or `'reconfirm'`: when an account confirmation mailer is requested for resending. +- `getUser()`: _Da\User\Model\User_, returns the current user model +- `getMailService()`: _Da\User\Service\MailService_, returns the mail service instance +- `getException()`: _Exception_, returns the exception object instance in case a mailer sending exception is received. + This will be `NULL` if no exception is received. It will also always be `NULL` for `MailEvent::EVENT_BEFORE_SEND_MAIL` + and any exception received will only be trapped via `MailEvent::EVENT_AFTER_SEND_MAIL`. + +How to Work With Mail Events +---------------------------- + +All these events receive an instance of `Da\User\Event\MailEvent`. The Event receives an instance of a `Da\Model\User` +class and the other getter method properties as listed earlier, that you could use for whatever logic you wish to implement. + +The recommended way to make use of events is by creating a new file in your config folder (i.e. `events.php`), configure +there all your events and then include that file on your +[`entry script`](http://www.yiiframework.com/doc-2.0/guide-structure-entry-scripts.html). + +Here is an example of setting an event for the `User` model: + +```php +getUser(); + $type = $event->getType(); + $mailService = $event->getMailService(); + + // ... your logic here +} + +// AFTER MAIL IS SENT: This will happen at the model's level +Event::on(User::class, MailEvent::EVENT_AFTER_SEND_MAIL, function (MailEvent $event) { + + $user = $event->getUser(); + $type = $event->getType(); + $mailService = $event->getMailService(); + $exception = $event->getException(); // fetches exception received if any + + // ... your logic here based on exception received for example + if ($exception !== null) { + // do something + } +} +``` + +Now, the only thing I need to do is adding the `events.php` file to your entry script (i.e. `index.php`). The following +is taken from the Yii 2 Advanced Application Template: + +```php +run(); + +``` + +© [2amigos](http://www.2amigos.us/) 2013-2017 diff --git a/docs/helpful-guides/how-to-implement-two-factor-auth.md b/docs/helpful-guides/how-to-implement-two-factor-auth.md index da9ed9b..53ebf79 100644 --- a/docs/helpful-guides/how-to-implement-two-factor-auth.md +++ b/docs/helpful-guides/how-to-implement-two-factor-auth.md @@ -1,18 +1,18 @@ -How to Implement Two-Factor Auth -================================ +How to Implement Two Factor Auth (2FA) +====================================== -Two-Factor Authentication products add an additional layer of security. Typically, users are asked to prove their +Two Factor Authentication products add an additional layer of security. Typically, users are asked to prove their identity by providing simple credentials such as an email address and a password. A second factor (2F) adds an extra layer of unauthorized access protection by prompting the user to provide an additional means of authentication such as a physical token (e.g. a card) or an additional secret that only they know. -With this module is quite easy. It basically implements two-factor authentication using the following 2amigos libraries: +With this module is quite easy. It basically implements two factor authentication using the following 2amigos libraries: - [2amigos/2fa-library](https://github.com/2amigos/2fa-library) - [2amigos/qrcode-library](https://github.com/2amigos/qrcode-library) -Enable Two-Factor +Enable Two Factor ----------------- We simply need to enable two factor authentication: @@ -26,7 +26,7 @@ We simply need to enable two factor authentication: ] ``` -Now, when the user go to its settings via `user/settings`, it will display the option to enable two-factor +Now, when the user go to its settings via `user/settings`, it will display the option to enable two factor authentication or not. When enabled, the module will show a modal with a QrCode that has to be scanned by the Google Authenticator App @@ -35,15 +35,15 @@ When enabled, the module will show a modal with a QrCode that has to be scanned [iTunes](https://itunes.apple.com/us/app/google-authenticator/id388497605?mt=8)). The application will display a code that needs to be inserted into the modal input box. If code verification goes well, -it will enable the two-factor for the user. +it will enable the two factor for the user. -If a user has enabled the two-factor, and after successfully login via username and email, it will render a new section +If a user has enabled the two factor, and after successfully login via username and email, it will render a new section where user will have to enter the code displayed on its Google Authenticator App in order to complete with the login process. ### Recommended Reading -- [2amigos Two-Factor Library Docs]()http://2fa-library.readthedocs.io/en/latest/) +- [2amigos Two Factor Library Docs]()http://2fa-library.readthedocs.io/en/latest/) © [2amigos](http://www.2amigos.us/) 2013-2017 diff --git a/docs/helpful-guides/social-network-authentication.md b/docs/helpful-guides/social-network-authentication.md index 8c50641..8a9552a 100644 --- a/docs/helpful-guides/social-network-authentication.md +++ b/docs/helpful-guides/social-network-authentication.md @@ -31,7 +31,7 @@ After you need to configure the `authClientCollection::clients` on your Applicat 'facebook' => [ 'class' => 'Da\User\AuthClient\Facebook', 'clientId' => 'facebook_client_id', - 'clientScret' => 'facebook_client_secret' + 'clientSecret' => 'facebook_client_secret' ] ] ] diff --git a/docs/index.md b/docs/index.md index 248f96f..dff4e43 100644 --- a/docs/index.md +++ b/docs/index.md @@ -77,7 +77,7 @@ return [ 'controllerMap' => [ 'migrate' => [ 'class' => \yii\console\controllers\MigrateController::class, - 'migrationPath => [ + 'migrationPath' => [ '@app/migrations', '@yii/rbac/migrations', // Just in case you forgot to run it on console (see next note) ], @@ -110,10 +110,27 @@ Once we have it installed, we have to configure it on your `config.php` file. 'modules' => [ 'user' => [ 'class' => Da\User\Module::class, + // ...other configs from here: [Configuration Options](installation/configuration-options.md), e.g. + // 'generatePasswords' => true, + // 'switchIdentitySessionKey' => 'myown_usuario_admin_user_key', ] ] ``` +NOTE: If you are using the Yii2 Basic Template, make sure you remove this (default user model config) from your `config.php`, +i.e. `config/web.php` file: + +```php +'components' => [ + 'user' => [ + 'identityClass' => 'app\models\User', + 'enableAutoLogin' => true, + ], +], +``` + +This will ensure the proper functionality of login/guest user detection etc. + Configuration may differ from template to template, the following are some guidelines for sidekit app template and the official Yii2 advanced application template: @@ -127,6 +144,7 @@ See also all the possible configuration options available: - [Console Commands](installation/console-commands.md) - [Mailer](installation/mailer.md) - [Available Actions](installation/available-actions.md) +- [Migration guide from Dektrium tools](installation/migration-guide-from-dektrium-tools.md) Enhancing and Overriding ------------------------ @@ -148,6 +166,7 @@ there all your events and then include that file on your [`entry script`](http://www.yiiframework.com/doc-2.0/guide-structure-entry-scripts.html). - [User Events](events/user-events.md) +- [Mail Events](events/mail-events.md) - [Form Events](events/form-events.md) - [Reset Password Events](events/reset-password-events.md) - [Social Network Authentication Events](events/social-network-auth-events.md) @@ -170,4 +189,4 @@ Contributing - [How to Contribute](contributing/how-to.md) - [Clean Code](contributing/clean-code.md) -© [2amigos](http://www.2amigos.us/) 2013-2017 +© [2amigos](http://www.2amigos.us/) 2013-2018 diff --git a/docs/installation/advanced-application-template.md b/docs/installation/advanced-application-template.md index fc70140..68c44e5 100644 --- a/docs/installation/advanced-application-template.md +++ b/docs/installation/advanced-application-template.md @@ -12,7 +12,7 @@ packages, and everything you need to start project in no time with batteries inc > [Check this manual page](sidekit-application-template.md) if you decided to use it. If you want to use the default [Basic Application Template](https://github.com/yiisoft/yii2-app-basic) with our -extension, then check [Basic Application Template documentation page](basic-application-template.md). +extension, then check [Basic Application Template documentation page](yii2-application-template.md). Step 1 - Install Advanced Application template ---------------------------------------------- @@ -57,7 +57,8 @@ which comes from the default installation of the Advanced Application Template. There are two ways to apply migrations of this extension, the first one: ```php -./yii migrate --migrationPath="@Da/User/Migration" +./yii migrate --migrationNamespaces=Da\\User\\Migration +./yii migrate --migrationPath=@yii/rbac/migrations ./yii migrate ``` @@ -75,6 +76,10 @@ return [ 'controllerMap' => [ 'migrate' => [ 'class' => \yii\console\controllers\MigrateController::class, + 'migrationPath' => [ + '@app/migrations', + '@yii/rbac/migrations', // Just in case you forgot to run it on console (see next note) + ], 'migrationNamespaces' => [ 'Da\User\Migration', ], diff --git a/docs/installation/configuration-options.md b/docs/installation/configuration-options.md index 99bc29c..a2a2224 100644 --- a/docs/installation/configuration-options.md +++ b/docs/installation/configuration-options.md @@ -43,6 +43,30 @@ If `true` it will allow users to login with unconfirmed emails. If `true` it will enable password recovery process. +#### allowAdminPasswordRecovery (type: `boolean`, default: `true`) + +If `true` and `allowPasswordRecovery` is false, it will enable administrator to send a password recovery email to a +user. + +#### maxPasswordAge (type: `integer`, default: `null`) + +If set to an integer value it will check user password age. If the days since last password change are greater than this configuration value +user will be forced to change it. This enforcement is done only at login stage. In order to perform the check in every action you must configure +a filter into your controller like this: +``` +use Da\User\Filter\PasswordAgeEnforceFilter; +class SiteController extends Controller +{ + public function behaviors() + { + return [ + [...] + 'enforcePasswordAge' => [ + 'class' => PasswordAgeEnforceFilter::className(), + ], +``` +This will redirect the user to their account page until the password has been updated. + #### allowAccountDelete (type: `boolean`, default: `true`) If `true` users will be able to remove their own accounts. @@ -57,7 +81,7 @@ Configures one of the three ways available to change user's password: - **MailChangeStrategyInterface::TYPE_SECURE**: A confirmation message will be sent to the previous and new user's email with a link that would require both to be click through to confirm the change. -#### rememberLoginLifespan (type: `integer`, default: `209600`) +#### rememberLoginLifespan (type: `integer`, default: `1209600`) Configures the time length in seconds a user will be remembered without the need to login again. The default time is 2 weeks. diff --git a/docs/installation/migration-guide-from-dektrium-tools.md b/docs/installation/migration-guide-from-dektrium-tools.md new file mode 100644 index 0000000..8689567 --- /dev/null +++ b/docs/installation/migration-guide-from-dektrium-tools.md @@ -0,0 +1,387 @@ +# Migration guide from Dektrium tools + +yii2-usuario is 99% compatible with [dektrium](https://github.com/dektrium/) tools. + +## Package removal + +First of all you need to remove the old packages. Depending on your installation you +need to remove one or both: +``` +composer remove dektrium/yii2-user +composer remove dektrium/yii2-rbac +``` + +## Configuration + +Configure the `config/console.php` stuff: + +```php + 'authManager' => [ + 'class' => 'yii\rbac\DbManager', + ], +``` + +Configure the controller map for migrations + +```php + 'controllerMap' => [ + 'migrate' => [ + 'class' => 'yii\console\controllers\MigrateController', + 'migrationNamespaces' => [ + 'Da\User\Migration', + ], + ], + ], +``` + +Remove the *modules > rbac* configuration parameter, and replace the value of *modules > user* with: +```php + 'user' => Da\User\Module::class, +``` + +In `config/web.php` remove *module > rbac* configuration and change the *modules > user* with: +```php + ... + 'user' => [ + 'class' => Da\User\Module::class, + // Othe yii2-usuario configuration parameters + 'enableRegistration' => false, + ], + ... +``` + +* If you had `modelMap` customization you have to replace them with `classMap`. +* In your extended model replace the `BaseUser` inheritance from `dektrium\user\models\User` to `Da\User\Model\User` +* If you had controller remapping replace the inheritance from `dektrium\user\controllers\XX` to `Da\User\Controller\XX` + +## Rbac migrations + +[yii2-rbac](https://github.com/dektrium/yii2-rbac) had a nice tool which are rbac migrations, which helped writing new permissions and roles. +There's no such feature in yii2-usuario, but in case you need to still apply them you can: + +1. create a migration component which basically it's the same as the original [Migration](https://github.com/dektrium/yii2-rbac/blob/master/migrations/Migration.php) object, with some minor changes. Copy the content below and save it in your `@app/components/RbacMigration.php`: + ```php + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + + namespace app\components; + + use yii\rbac\DbManager; + use yii\db\Migration; + use yii\di\Instance; + use yii\rbac\Item; + use yii\rbac\Permission; + use yii\rbac\Role; + use yii\rbac\Rule; + + /** + * Migration for applying new RBAC items. + * + * @author Dmitry Erofeev + */ + class RbacMigration extends Migration + { + /** + * @var string|DbManager The auth manager component ID that this migration should work with. + */ + public $authManager = 'authManager'; + + /** + * Initializes the migration. + * This method will set [[authManager]] to be the 'authManager' application component, if it is `null`. + */ + public function init() + { + parent::init(); + + $this->authManager = Instance::ensure($this->authManager, DbManager::className()); + } + + /** + * Creates new permission. + * + * @param string $name The name of the permission + * @param string $description The description of the permission + * @param string|null $ruleName The rule associated with the permission + * @param mixed|null $data The additional data associated with the permission + * @return Permission + */ + protected function createPermission($name, $description = '', $ruleName = null, $data = null) + { + echo " > create permission $name ..."; + $time = microtime(true); + $permission = $this->authManager->createPermission($name); + + $permission->description = $description; + $permission->ruleName = $ruleName; + $permission->data = $data; + + $this->authManager->add($permission); + echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n"; + + return $permission; + } + + /** + * Creates new role. + * + * @param string $name The name of the role + * @param string $description The description of the role + * @param string|null $ruleName The rule associated with the role + * @param mixed|null $data The additional data associated with the role + * @return Role + */ + protected function createRole($name, $description = '', $ruleName = null, $data = null) + { + echo " > create role $name ..."; + $time = microtime(true); + $role = $this->authManager->createRole($name); + + $role->description = $description; + $role->ruleName = $ruleName; + $role->data = $data; + + $this->authManager->add($role); + echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n"; + + return $role; + } + + /** + * Creates new rule. + * + * @param string $ruleName The name of the rule + * @param string|array $definition The class of the rule + * @return Rule + */ + protected function createRule($ruleName, $definition) + { + echo " > create rule $ruleName ..."; + $time = microtime(true); + + if (is_array($definition)) { + $definition['name'] = $ruleName; + } else { + $definition = [ + 'class' => $definition, + 'name' => $ruleName, + ]; + } + + /** @var Rule $rule */ + $rule = \Yii::createObject($definition); + + $this->authManager->add($rule); + echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n"; + + return $rule; + } + + /** + * Finds either role or permission or throws an exception if it is not found. + * + * @param string $name + * @return Permission|Role|null + */ + protected function findItem($name) + { + $item = $this->authManager->getRole($name); + + if ($item instanceof Role) { + return $item; + } + + $item = $this->authManager->getPermission($name); + + if ($item instanceof Permission) { + return $item; + } + + return null; + } + + /** + * Finds the role or throws an exception if it is not found. + * + * @param string $name + * @return Role|null + */ + protected function findRole($name) + { + $role = $this->authManager->getRole($name); + + if ($role instanceof Role) { + return $role; + } + + return null; + } + + /** + * Finds the permission or throws an exception if it is not found. + * + * @param string $name + * @return Permission|null + */ + protected function findPermission($name) + { + $permission = $this->authManager->getPermission($name); + + if ($permission instanceof Permission) { + return $permission; + } + + return null; + } + + /** + * Removes auth item. + * + * @param string|Item $item Either item name or item instance to be removed. + */ + protected function removeItem($item) + { + if (is_string($item)) { + $item = $this->findItem($item); + } + + echo " > removing $item->name ..."; + $time = microtime(true); + $this->authManager->remove($item); + echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n"; + } + + /** + * Adds child. + * + * @param Item|string $parent Either name or Item instance which is parent + * @param Item|string $child Either name or Item instance which is child + */ + protected function addChild($parent, $child) + { + if (is_string($parent)) { + $parent = $this->findItem($parent); + } + + if (is_string($child)) { + $child = $this->findItem($child); + } + + echo " > adding $child->name as child to $parent->name ..."; + $time = microtime(true); + $this->authManager->addChild($parent, $child); + echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n"; + } + + /** + * Assigns a role to a user. + * + * @param string|Role $role + * @param string|int $userId + */ + protected function assign($role, $userId) + { + if (is_string($role)) { + $role = $this->findRole($role); + } + + echo " > assigning $role->name to user $userId ..."; + $time = microtime(true); + $this->authManager->assign($role, $userId); + echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n"; + } + + /** + * Updates role. + * + * @param string|Role $role + * @param string $description + * @param string $ruleName + * @param mixed $data + * @return Role + */ + protected function updateRole($role, $description = '', $ruleName = null, $data = null) + { + if (is_string($role)) { + $role = $this->findRole($role); + } + + echo " > update role $role->name ..."; + $time = microtime(true); + + $role->description = $description; + $role->ruleName = $ruleName; + $role->data = $data; + + $this->authManager->update($role->name, $role); + echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n"; + + return $role; + } + + /** + * Updates permission. + * + * @param string|Permission $permission + * @param string $description + * @param string $ruleName + * @param mixed $data + * @return Permission + */ + protected function updatePermission($permission, $description = '', $ruleName = null, $data = null) + { + if (is_string($permission)) { + $permission = $this->findPermission($permission); + } + + echo " > update permission $permission->name ..."; + $time = microtime(true); + + $permission->description = $description; + $permission->ruleName = $ruleName; + $permission->data = $data; + + $this->authManager->update($permission->name, $permission); + echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n"; + + return $permission; + } + + /** + * Updates rule. + * + * @param string $ruleName + * @param string $className + * @return Rule + */ + protected function updateRule($ruleName, $className) + { + echo " > update rule $ruleName ..."; + $time = microtime(true); + + /** @var Rule $rule */ + $rule = \Yii::createObject([ + 'class' => $className, + 'name' => $ruleName, + ]); + + $this->authManager->update($ruleName, $rule); + echo ' done (time: ' . sprintf('%.3f', microtime(true) - $time) . "s)\n"; + + return $rule; + } + } + + ``` + +2. change the inheritance of the `@app/rbac/migrations` files to `app\components\RbacMigration as Migration` + +... and you're done! You can still apply your rbac migrations with `./yii migrate/up --migrationPath=@yii/rbac/migrations`. diff --git a/docs/installation/yii2-application-template.md b/docs/installation/yii2-application-template.md index cbd1d6b..1b9a581 100644 --- a/docs/installation/yii2-application-template.md +++ b/docs/installation/yii2-application-template.md @@ -45,7 +45,8 @@ which comes from the default installation of the Advanced Application Template. There are two ways to apply migrations of this extension, the first one: ```php -./yii migrate --migrationPath="@Da/User/Migration" +./yii migrate --migrationNamespaces=Da\\User\\Migration +./yii migrate --migrationPath=@yii/rbac/migrations ./yii migrate ``` @@ -66,6 +67,10 @@ return [ 'migrationNamespaces' => [ 'Da\User\Migration', ], + 'migrationPath' => [ + '@app/migrations', + '@yii/rbac/migrations', + ], ], ], // ... diff --git a/src/User/AuthClient/Facebook.php b/src/User/AuthClient/Facebook.php index e2a3ce1..b910539 100644 --- a/src/User/AuthClient/Facebook.php +++ b/src/User/AuthClient/Facebook.php @@ -31,6 +31,7 @@ class Facebook extends BaseFacebook implements AuthClientInterface */ public function getUsername() { - return null; + /* returns the e-mail as it corresponds with the username */ + return $this->getEmail(); } } diff --git a/src/User/AuthClient/Google.php b/src/User/AuthClient/Google.php index 871dabc..4f04e01 100644 --- a/src/User/AuthClient/Google.php +++ b/src/User/AuthClient/Google.php @@ -31,6 +31,7 @@ class Google extends BaseGoogle implements AuthClientInterface */ public function getUsername() { - return null; + /* returns the e-mail as it corresponds with the username */ + return $this->getEmail(); } } diff --git a/src/User/AuthClient/LinkedIn.php b/src/User/AuthClient/LinkedIn.php index 9528760..b99aa5b 100644 --- a/src/User/AuthClient/LinkedIn.php +++ b/src/User/AuthClient/LinkedIn.php @@ -31,6 +31,7 @@ class LinkedIn extends BaseLinkedIn implements AuthClientInterface */ public function getUsername() { - return null; + /* returns the e-mail as it corresponds with the username */ + return $this->getEmail(); } } diff --git a/src/User/Bootstrap.php b/src/User/Bootstrap.php index 3ece9fe..a40200f 100644 --- a/src/User/Bootstrap.php +++ b/src/User/Bootstrap.php @@ -20,10 +20,15 @@ use yii\authclient\Collection; use yii\base\Application; use yii\base\BootstrapInterface; use yii\base\Exception; +use yii\base\InvalidConfigException; use yii\console\Application as ConsoleApplication; use yii\i18n\PhpMessageSource; use yii\web\Application as WebApplication; +use yii\base\Event; +use Da\User\Event\FormEvent; +use Da\User\Controller\SecurityController; + /** * Bootstrap class of the yii2-usuario extension. Configures container services, initializes translations, * builds class map, and does the other setup actions participating in the application bootstrap process. @@ -32,6 +37,8 @@ class Bootstrap implements BootstrapInterface { /** * {@inheritdoc} + * + * @throws InvalidConfigException */ public function bootstrap($app) { @@ -90,6 +97,7 @@ class Bootstrap implements BootstrapInterface // services $di->set(Service\AccountConfirmationService::class); $di->set(Service\EmailChangeService::class); + $di->set(Service\PasswordExpireService::class); $di->set(Service\PasswordRecoveryService::class); $di->set(Service\ResendConfirmationService::class); $di->set(Service\ResetPasswordService::class); @@ -143,12 +151,24 @@ class Bootstrap implements BootstrapInterface $di->set(Search\RoleSearch::class); } + // Attach an event to check if the password has expired + if (!is_null(Yii::$app->getModule('user')->maxPasswordAge)) { + Event::on(SecurityController::class, FormEvent::EVENT_AFTER_LOGIN, function (FormEvent $event) { + $user = $event->form->user; + if ($user->password_age >= Yii::$app->getModule('user')->maxPasswordAge) { + // Force password change + Yii::$app->session->setFlash('warning', Yii::t('usuario', 'Your password has expired, you must change it now')); + Yii::$app->response->redirect(['/user/settings/account'])->send(); + } + }); + } + if ($app instanceof WebApplication) { // override Yii $di->set( 'yii\web\User', [ - 'enableAutoLogin' => true, + 'enableAutoLogin' => $app->getModule('user')->enableAutoLogin, 'loginUrl' => ['/user/security/login'], 'identityClass' => $di->get(ClassMapHelper::class)->get(User::class), ] @@ -163,6 +183,8 @@ class Bootstrap implements BootstrapInterface * Registers module translation messages. * * @param Application $app + * + * @throws InvalidConfigException */ protected function initTranslations(Application $app) { @@ -179,6 +201,8 @@ class Bootstrap implements BootstrapInterface * Ensures the auth manager is the one provided by the library. * * @param Application $app + * + * @throws InvalidConfigException */ protected function initAuthManager(Application $app) { @@ -196,6 +220,8 @@ class Bootstrap implements BootstrapInterface * Initializes web url routes (rules in Yii2). * * @param WebApplication $app + * + * @throws InvalidConfigException */ protected function initUrlRoutes(WebApplication $app) { @@ -238,6 +264,8 @@ class Bootstrap implements BootstrapInterface * Ensures the authCollection component is configured. * * @param WebApplication $app + * + * @throws InvalidConfigException */ protected function initAuthCollection(WebApplication $app) { @@ -272,6 +300,7 @@ class Bootstrap implements BootstrapInterface * * @param array $userClassMap user configuration on the module * + * @throws Exception * @return array */ protected function buildClassMap(array $userClassMap) @@ -345,7 +374,7 @@ class Bootstrap implements BootstrapInterface protected function getRoute(array $routes, $name) { foreach ($routes as $route => $names) { - if (in_array($name, $names)) { + if (in_array($name, $names, false)) { return $route; } } diff --git a/src/User/Component/AuthDbManagerComponent.php b/src/User/Component/AuthDbManagerComponent.php index 7422e58..49f7686 100644 --- a/src/User/Component/AuthDbManagerComponent.php +++ b/src/User/Component/AuthDbManagerComponent.php @@ -68,7 +68,6 @@ class AuthDbManagerComponent extends DbManager implements AuthManagerInterface $roles = []; foreach ($query->all($this->db) as $row) { $roles[$row['name']] = $this->populateItem($row); - $roles[$row['name']] = $this->populateItem($row); } return $roles; diff --git a/src/User/Component/ReCaptchaComponent.php b/src/User/Component/ReCaptchaComponent.php index 31f57a5..3853105 100644 --- a/src/User/Component/ReCaptchaComponent.php +++ b/src/User/Component/ReCaptchaComponent.php @@ -29,6 +29,8 @@ class ReCaptchaComponent extends Component /** * @inheritdoc + * + * @throws InvalidConfigException */ public function init() { @@ -61,7 +63,7 @@ class ReCaptchaComponent extends Component ] )) ->get( - 'site/verify', + 'siteverify', [ 'secret' => $this->secret, 'response' => $value, @@ -70,6 +72,6 @@ class ReCaptchaComponent extends Component ) ->send(); - return $response['success'] ? : false; + return $response->getData()['success'] ? : false; } } diff --git a/src/User/Controller/AdminController.php b/src/User/Controller/AdminController.php index 57cce4f..8a7ec8b 100644 --- a/src/User/Controller/AdminController.php +++ b/src/User/Controller/AdminController.php @@ -18,6 +18,8 @@ use Da\User\Model\Profile; use Da\User\Model\User; use Da\User\Query\UserQuery; use Da\User\Search\UserSearch; +use Da\User\Service\PasswordExpireService; +use Da\User\Service\PasswordRecoveryService; use Da\User\Service\SwitchIdentityService; use Da\User\Service\UserBlockService; use Da\User\Service\UserConfirmationService; @@ -81,7 +83,8 @@ class AdminController extends Controller 'delete' => ['post'], 'confirm' => ['post'], 'block' => ['post'], - 'switch-identity' => ['post'] + 'switch-identity' => ['post'], + 'password-reset' => ['post'] ], ], 'access' => [ @@ -128,7 +131,7 @@ class AdminController extends Controller $this->make(AjaxRequestModelValidator::class, [$user])->validate(); - if ($user->load(Yii::$app->request->post())) { + if ($user->load(Yii::$app->request->post()) && $user->validate()) { $this->trigger(UserEvent::EVENT_BEFORE_CREATE, $event); $mailService = MailFactory::makeWelcomeMailerService($user); @@ -136,9 +139,9 @@ class AdminController extends Controller if ($this->make(UserCreateService::class, [$user, $mailService])->run()) { Yii::$app->getSession()->setFlash('success', Yii::t('usuario', 'User has been created')); $this->trigger(UserEvent::EVENT_AFTER_CREATE, $event); - return $this->redirect(['update', 'id' => $user->id]); } + Yii::$app->session->setFlash('danger', Yii::t('usuario', 'User account could not be created.')); } return $this->render('create', ['user' => $user]); @@ -309,4 +312,37 @@ class AdminController extends Controller return $this->goHome(); } + + public function actionPasswordReset($id) + { + /** @var User $user */ + $user = $this->userQuery->where(['id' => $id])->one(); + $mailService = MailFactory::makeRecoveryMailerService($user->email); + if ($this->make(PasswordRecoveryService::class, [$user->email, $mailService])->run()) { + Yii::$app->getSession()->setFlash('success', Yii::t('usuario', 'Recovery message sent')); + } else { + Yii::$app->getSession()->setFlash( + 'danger', + Yii::t('usuario', 'Unable to send recovery message to the user') + ); + } + + return $this->redirect(['index']); + } + + /** + * Forces the user to change password at next login + * @param integer $id + */ + public function actionForcePasswordChange($id) + { + /** @var User $user */ + $user = $this->userQuery->where(['id' => $id])->one(); + if ($this->make(PasswordExpireService::class, [$user])->run()) { + Yii::$app->session->setFlash("success", Yii::t('usuario', 'User will be required to change password at next login')); + } else { + Yii::$app->session->setFlash("danger", Yii::t('usuario', 'There was an error in saving user')); + } + $this->redirect(['index']); + } } diff --git a/src/User/Controller/PermissionController.php b/src/User/Controller/PermissionController.php index fef9eb4..40fd707 100644 --- a/src/User/Controller/PermissionController.php +++ b/src/User/Controller/PermissionController.php @@ -35,6 +35,8 @@ class PermissionController extends AbstractAuthItemController /** * {@inheritdoc} + * + * @throws NotFoundHttpException */ protected function getItem($name) { diff --git a/src/User/Controller/RecoveryController.php b/src/User/Controller/RecoveryController.php index ad1f931..cd2f621 100644 --- a/src/User/Controller/RecoveryController.php +++ b/src/User/Controller/RecoveryController.php @@ -24,6 +24,8 @@ use Da\User\Service\ResetPasswordService; use Da\User\Traits\ContainerAwareTrait; use Da\User\Validator\AjaxRequestModelValidator; use Yii; +use yii\base\InvalidConfigException; +use yii\base\InvalidParamException; use yii\filters\AccessControl; use yii\web\Controller; use yii\web\NotFoundHttpException; @@ -74,6 +76,8 @@ class RecoveryController extends Controller * Displays / handles user password recovery request. * * @throws NotFoundHttpException + * @throws InvalidConfigException + * @throws InvalidParamException * @return string * */ @@ -90,7 +94,7 @@ class RecoveryController extends Controller $this->make(AjaxRequestModelValidator::class, [$form])->validate(); - if ($form->load(Yii::$app->request->post())) { + if ($form->load(Yii::$app->request->post()) && $form->validate()) { $this->trigger(FormEvent::EVENT_BEFORE_REQUEST, $event); $mailService = MailFactory::makeRecoveryMailerService($form->email); @@ -118,12 +122,14 @@ class RecoveryController extends Controller * @param $code * * @throws NotFoundHttpException + * @throws InvalidConfigException + * @throws InvalidParamException * @return string * */ public function actionReset($id, $code) { - if (!$this->module->allowPasswordRecovery) { + if (!$this->module->allowPasswordRecovery && !$this->module->allowAdminPasswordRecovery) { throw new NotFoundHttpException(); } /** @var Token $token */ diff --git a/src/User/Controller/RegistrationController.php b/src/User/Controller/RegistrationController.php index 53899ef..8c97bce 100644 --- a/src/User/Controller/RegistrationController.php +++ b/src/User/Controller/RegistrationController.php @@ -106,15 +106,18 @@ class RegistrationController extends Controller $mailService = MailFactory::makeWelcomeMailerService($user); if ($this->make(UserRegisterService::class, [$user, $mailService])->run()) { - Yii::$app->session->setFlash( - 'info', - Yii::t( - 'usuario', - 'Your account has been created and a message with further instructions has been sent to your email' - ) - ); + if ($this->module->enableEmailConfirmation) { + Yii::$app->session->setFlash( + 'info', + Yii::t( + 'usuario', + 'Your account has been created and a message with further instructions has been sent to your email' + ) + ); + } else { + Yii::$app->session->setFlash('info', Yii::t('usuario', 'Your account has been created')); + } $this->trigger(FormEvent::EVENT_AFTER_REGISTER, $event); - return $this->render( '/shared/message', [ @@ -123,15 +126,9 @@ class RegistrationController extends Controller ] ); } + Yii::$app->session->setFlash('danger', Yii::t('usuario', 'User could not be registered.')); } - - return $this->render( - 'register', - [ - 'model' => $form, - 'module' => $this->module, - ] - ); + return $this->render('register', ['model' => $form, 'module' => $this->module]); } public function actionConnect($code) @@ -152,7 +149,7 @@ class RegistrationController extends Controller $this->make(AjaxRequestModelValidator::class, [$user])->validate(); - if ($user->load(Yii::$app->request->post())) { + if ($user->load(Yii::$app->request->post()) && $user->validate()) { $this->trigger(SocialNetworkConnectEvent::EVENT_BEFORE_CONNECT, $event); $mailService = MailFactory::makeWelcomeMailerService($user); diff --git a/src/User/Controller/RoleController.php b/src/User/Controller/RoleController.php index 1490ca3..938ce80 100644 --- a/src/User/Controller/RoleController.php +++ b/src/User/Controller/RoleController.php @@ -35,6 +35,8 @@ class RoleController extends AbstractAuthItemController /** * {@inheritdoc} + * + * @throws NotFoundHttpException */ protected function getItem($name) { diff --git a/src/User/Controller/RuleController.php b/src/User/Controller/RuleController.php index dbce6c2..ccd6134 100644 --- a/src/User/Controller/RuleController.php +++ b/src/User/Controller/RuleController.php @@ -17,10 +17,12 @@ use Da\User\Service\AuthRuleEditionService; use Da\User\Traits\AuthManagerAwareTrait; use Da\User\Traits\ContainerAwareTrait; use Da\User\Validator\AjaxRequestModelValidator; +use Da\User\Filter\AccessRuleFilter; use Yii; use yii\filters\VerbFilter; use yii\web\Controller; use yii\web\NotFoundHttpException; +use yii\filters\AccessControl; class RuleController extends Controller { @@ -33,12 +35,24 @@ class RuleController extends Controller public function behaviors() { return [ - [ + 'verbs' => [ 'class' => VerbFilter::className(), 'actions' => [ 'delete' => ['POST'], ], - ] + ], + 'access' => [ + 'class' => AccessControl::className(), + 'ruleConfig' => [ + 'class' => AccessRuleFilter::className(), + ], + 'rules' => [ + [ + 'allow' => true, + 'roles' => ['admin'], + ], + ], + ], ]; } diff --git a/src/User/Controller/SecurityController.php b/src/User/Controller/SecurityController.php index 55631a9..00c373e 100644 --- a/src/User/Controller/SecurityController.php +++ b/src/User/Controller/SecurityController.php @@ -21,6 +21,8 @@ use Da\User\Service\SocialNetworkAuthenticateService; use Da\User\Traits\ContainerAwareTrait; use Yii; use yii\authclient\AuthAction; +use yii\base\InvalidConfigException; +use yii\base\InvalidParamException; use yii\base\Module; use yii\filters\AccessControl; use yii\filters\VerbFilter; @@ -102,6 +104,8 @@ class SecurityController extends Controller /** * Controller action responsible for handling login page and actions. * + * @throws InvalidConfigException + * @throws InvalidParamException * @return array|string|Response */ public function actionLogin() @@ -133,7 +137,10 @@ class SecurityController extends Controller $this->trigger(FormEvent::EVENT_BEFORE_LOGIN, $event); if ($form->login()) { - $form->getUser()->updateAttributes(['last_login_at' => time()]); + $form->getUser()->updateAttributes([ + 'last_login_at' => time(), + 'last_login_ip' => Yii::$app->request->getUserIP(), + ]); $this->trigger(FormEvent::EVENT_AFTER_LOGIN, $event); diff --git a/src/User/Controller/SettingsController.php b/src/User/Controller/SettingsController.php index ab0179d..74b7cde 100644 --- a/src/User/Controller/SettingsController.php +++ b/src/User/Controller/SettingsController.php @@ -235,7 +235,7 @@ class SettingsController extends Controller if ($account === null) { throw new NotFoundHttpException(); } - if ($account->user_id != Yii::$app->user->id) { + if ($account->user_id !== Yii::$app->user->id) { throw new ForbiddenHttpException(); } $event = $this->make(SocialNetworkConnectEvent::class, [Yii::$app->user->identity, $account]); @@ -321,7 +321,7 @@ class SettingsController extends Controller { $user = $this->userQuery->whereId($id)->one(); - if ($user === null || $this->module->emailChangeStrategy == MailChangeStrategyInterface::TYPE_INSECURE) { + if ($user === null || MailChangeStrategyInterface::TYPE_INSECURE === $this->module->emailChangeStrategy) { throw new NotFoundHttpException(); } $event = $this->make(UserEvent::class, [$user]); @@ -347,7 +347,6 @@ class SettingsController extends Controller public function actionDisconnect($id) { $this->disconnectSocialNetwork($id); - return $this->redirect(['networks']); } @@ -409,7 +408,7 @@ class SettingsController extends Controller return [ 'success' => $success, 'message' => $success - ? Yii::t('usuario', 'Two factor successfully enabled.') + ? Yii::t('usuario', 'Two factor authentication successfully enabled.') : Yii::t('usuario', 'Verification failed. Please, enter new code.') ]; } @@ -426,11 +425,11 @@ class SettingsController extends Controller if ($user->updateAttributes(['auth_tf_enabled' => '0'])) { Yii::$app ->getSession() - ->setFlash('success', Yii::t('usuario', 'Two-factor authorization has been disabled.')); + ->setFlash('success', Yii::t('usuario', 'Two factor authentication has been disabled.')); } else { Yii::$app ->getSession() - ->setFlash('danger', Yii::t('usuario', 'Unable to disable two-factor authorization.')); + ->setFlash('danger', Yii::t('usuario', 'Unable to disable Two factor authentication.')); } $this->redirect(['account']); diff --git a/src/User/Event/MailEvent.php b/src/User/Event/MailEvent.php new file mode 100644 index 0000000..8ebe5f8 --- /dev/null +++ b/src/User/Event/MailEvent.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Da\User\Event; + +use Da\User\Model\User; +use Da\User\Service\MailService; +use yii\base\Event; + +class MailEvent extends Event +{ + const TYPE_WELCOME = 'welcome'; + const TYPE_RECOVERY = 'recovery'; + const TYPE_CONFIRM = 'confirm'; + const TYPE_RECONFIRM = 'reconfirm'; + + const EVENT_BEFORE_SEND_MAIL = 'beforeSendMail'; + const EVENT_AFTER_SEND_MAIL = 'afterSendMail'; + + protected $type; + protected $user; + protected $mailService; + protected $exception; + + public function __construct($type, User $user, MailService $mailService, $exception, $config = []) + { + $this->type = $type; + $this->user = $user; + $this->mailService = $mailService; + $this->exception = $exception; + + parent::__construct($config); + } + + public function getType() + { + return $this->type; + } + + public function getUser() + { + return $this->user; + } + + public function getMailService() + { + return $this->mailService; + } + + public function getException() + { + return $this->exception; + } +} diff --git a/src/User/Event/ProfileEvent.php b/src/User/Event/ProfileEvent.php index 7a19f29..902c276 100644 --- a/src/User/Event/ProfileEvent.php +++ b/src/User/Event/ProfileEvent.php @@ -22,7 +22,7 @@ class ProfileEvent extends Event { $this->profile = $profile; - return parent::__construct($config); + parent::__construct($config); } public function getProfile() diff --git a/src/User/Factory/EmailChangeStrategyFactory.php b/src/User/Factory/EmailChangeStrategyFactory.php index 15e929e..3253df6 100644 --- a/src/User/Factory/EmailChangeStrategyFactory.php +++ b/src/User/Factory/EmailChangeStrategyFactory.php @@ -18,6 +18,7 @@ use Da\User\Strategy\InsecureEmailChangeStrategy; use Da\User\Strategy\SecureEmailChangeStrategy; use Exception; use Yii; +use yii\base\InvalidParamException; class EmailChangeStrategyFactory { @@ -41,7 +42,7 @@ class EmailChangeStrategyFactory return Yii::$container->get(static::$map[$strategy], [$form]); } - throw new Exception('Unknown strategy type'); + throw new InvalidParamException('Unknown strategy type'); } /** diff --git a/src/User/Factory/MailFactory.php b/src/User/Factory/MailFactory.php index 2fef8b7..13fd3e5 100644 --- a/src/User/Factory/MailFactory.php +++ b/src/User/Factory/MailFactory.php @@ -11,11 +11,13 @@ namespace Da\User\Factory; +use Da\User\Event\MailEvent; use Da\User\Model\Token; use Da\User\Model\User; use Da\User\Module; use Da\User\Service\MailService; use Yii; +use yii\base\InvalidConfigException; class MailFactory { @@ -23,6 +25,7 @@ class MailFactory * @param User $user * @param bool $showPassword * + * @throws InvalidConfigException * @return MailService */ public static function makeWelcomeMailerService(User $user, $showPassword = false) @@ -39,13 +42,14 @@ class MailFactory 'showPassword' => $showPassword, ]; - return static::makeMailerService($from, $to, $subject, 'welcome', $params); + return static::makeMailerService(MailEvent::TYPE_WELCOME, $from, $to, $subject, 'welcome', $params); } /** * @param string $email * @param Token $token * + * @throws InvalidConfigException * @return MailService */ public static function makeRecoveryMailerService($email, Token $token = null) @@ -60,13 +64,14 @@ class MailFactory 'token' => $token, ]; - return static::makeMailerService($from, $to, $subject, 'recovery', $params); + return static::makeMailerService(MailEvent::TYPE_RECOVERY, $from, $to, $subject, 'recovery', $params); } /** * @param User $user * @param Token|null $token * + * @throws InvalidConfigException * @return MailService */ public static function makeConfirmationMailerService(User $user, Token $token = null) @@ -81,13 +86,14 @@ class MailFactory 'token' => $token, ]; - return static::makeMailerService($from, $to, $subject, 'recovery', $params); + return static::makeMailerService(MailEvent::TYPE_CONFIRM, $from, $to, $subject, 'recovery', $params); } /** * @param User $user * @param Token $token * + * @throws InvalidConfigException * @return MailService */ public static function makeReconfirmationMailerService(User $user, Token $token) @@ -105,22 +111,29 @@ class MailFactory 'token' => $token, ]; - return static::makeMailerService($from, $to, $subject, 'recovery', $params); + return static::makeMailerService(MailEvent::TYPE_RECONFIRM, $from, $to, $subject, 'reconfirmation', $params); } /** * Builds a MailerService. * + * @param string $type * @param string $from * @param string $to * @param string $subject * @param string $view * @param array $params * + * @throws InvalidConfigException * @return MailService + * */ - public static function makeMailerService($from, $to, $subject, $view, array $params = []) + public static function makeMailerService($type, $from, $to, $subject, $view, $params = []) { - return Yii::$container->get(MailService::class, [$from, $to, $subject, $view, $params, Yii::$app->getMailer()]); + /** @noinspection PhpIncompatibleReturnTypeInspection */ + return Yii::$container->get( + MailService::class, + [$type, $from, $to, $subject, $view, $params, Yii::$app->getMailer()] + ); } } diff --git a/src/User/Factory/TokenFactory.php b/src/User/Factory/TokenFactory.php index 0e831a4..8f91e21 100644 --- a/src/User/Factory/TokenFactory.php +++ b/src/User/Factory/TokenFactory.php @@ -13,12 +13,14 @@ namespace Da\User\Factory; use Da\User\Model\Token; use Yii; +use yii\base\InvalidConfigException; class TokenFactory { /** * @param $userId * + * @throws InvalidConfigException * @return Token */ public static function makeConfirmationToken($userId) @@ -47,6 +49,7 @@ class TokenFactory /** * @param $userId * + * @throws InvalidConfigException * @return Token */ public static function makeConfirmOldMailToken($userId) @@ -61,6 +64,7 @@ class TokenFactory /** * @param $userId * + * @throws InvalidConfigException * @return Token */ public static function makeRecoveryToken($userId) @@ -76,7 +80,8 @@ class TokenFactory * @param $userId * @param $type * - * @return Token + * @throws InvalidConfigException + * @return Token|\object */ protected static function make($userId, $type) { diff --git a/src/User/Filter/AccessRuleFilter.php b/src/User/Filter/AccessRuleFilter.php index e0e2402..3f1c492 100644 --- a/src/User/Filter/AccessRuleFilter.php +++ b/src/User/Filter/AccessRuleFilter.php @@ -43,9 +43,10 @@ class AccessRuleFilter extends AccessRule return true; } } else { - if (!isset($roleParams)) { - $roleParams = $this->roleParams instanceof Closure ? call_user_func($this->roleParams, $this) : $this->roleParams; - } + $roleParams = $this->roleParams instanceof Closure + ? call_user_func($this->roleParams, $this) + : $this->roleParams; + if ($user->can($role, $roleParams)) { return true; } diff --git a/src/User/Filter/PasswordAgeEnforceFilter.php b/src/User/Filter/PasswordAgeEnforceFilter.php new file mode 100644 index 0000000..2da75dc --- /dev/null +++ b/src/User/Filter/PasswordAgeEnforceFilter.php @@ -0,0 +1,39 @@ + + * @author Lorenzo Milesi + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Da\User\Filter; + +use Yii; +use yii\base\ActionFilter; + +class PasswordAgeEnforceFilter extends ActionFilter +{ + public function beforeAction($action) + { + $maxPasswordAge = Yii::$app->getModule('user')->maxPasswordAge; + // If feature is not set do nothing (or raise a configuration error?) + if (is_null($maxPasswordAge)) { + return parent::beforeAction($action); + } + if (Yii::$app->user->isGuest) { + // Not our business + return parent::beforeAction($action); + } + if (Yii::$app->user->identity->password_age >= $maxPasswordAge) { + // Force password change + Yii::$app->getSession()->setFlash('warning', Yii::t('usuario', 'Your password has expired, you must change it now')); + return Yii::$app->response->redirect(['/user/settings/account'])->send(); + } + + return parent::beforeAction($action); + } +} diff --git a/src/User/Form/LoginForm.php b/src/User/Form/LoginForm.php index cd171eb..3327fba 100644 --- a/src/User/Form/LoginForm.php +++ b/src/User/Form/LoginForm.php @@ -11,12 +11,14 @@ namespace Da\User\Form; +use Da\TwoFA\Exception\InvalidSecretKeyException; use Da\User\Helper\SecurityHelper; use Da\User\Model\User; use Da\User\Query\UserQuery; use Da\User\Traits\ModuleAwareTrait; use Da\User\Validator\TwoFactorCodeValidator; use Yii; +use yii\base\InvalidParamException; use yii\base\Model; class LoginForm extends Model @@ -73,12 +75,14 @@ class LoginForm extends Model 'login' => Yii::t('usuario', 'Login'), 'password' => Yii::t('usuario', 'Password'), 'rememberMe' => Yii::t('usuario', 'Remember me next time'), - 'twoFactorAuthenticationCode' => Yii::t('usuario', 'Two-factor authentication code') + 'twoFactorAuthenticationCode' => Yii::t('usuario', 'Two factor authentication code') ]; } /** * {@inheritdoc} + * + * @throws InvalidSecretKeyException */ public function rules() { @@ -111,7 +115,7 @@ class LoginForm extends Model $this->module->twoFactorAuthenticationCycles )) ->validate()) { - $this->addError($attribute, Yii::t('usuario', 'Invalid two-factor code')); + $this->addError($attribute, Yii::t('usuario', 'Invalid two factor authentication code')); } } ], @@ -137,6 +141,7 @@ class LoginForm extends Model /** * Validates form and logs the user in. * + * @throws InvalidParamException * @return bool whether the user is logged in successfully */ public function login() diff --git a/src/User/Form/RegistrationForm.php b/src/User/Form/RegistrationForm.php index 3b745c7..441faf4 100644 --- a/src/User/Form/RegistrationForm.php +++ b/src/User/Form/RegistrationForm.php @@ -42,6 +42,8 @@ class RegistrationForm extends Model /** * {@inheritdoc} + * + * @throws \Exception */ public function rules() { diff --git a/src/User/Form/SettingsForm.php b/src/User/Form/SettingsForm.php index 25a9b3d..3366b34 100644 --- a/src/User/Form/SettingsForm.php +++ b/src/User/Form/SettingsForm.php @@ -17,7 +17,10 @@ use Da\User\Model\User; use Da\User\Traits\ContainerAwareTrait; use Da\User\Traits\ModuleAwareTrait; use Yii; +use yii\base\InvalidConfigException; +use yii\base\InvalidParamException; use yii\base\Model; +use yii\helpers\ArrayHelper; class SettingsForm extends Model { @@ -48,18 +51,30 @@ class SettingsForm extends Model /** @var User */ protected $user; + /** + * SettingsForm constructor. + * + * @param SecurityHelper $securityHelper + * @param array $config + */ public function __construct(SecurityHelper $securityHelper, array $config = []) { $this->securityHelper = $securityHelper; - $config = [ - 'username' => $this->getUser()->username, - 'email' => $this->getUser()->unconfirmed_email? : $this->getUser()->email - ]; + $config = ArrayHelper::merge( + [ + 'username' => $this->getUser()->username, + 'email' => $this->getUser()->unconfirmed_email ?: $this->getUser()->email + ], + $config + ); parent::__construct($config); } /** + * @throws InvalidConfigException + * @throws InvalidParamException * @return array + * */ public function rules() { @@ -75,7 +90,7 @@ class SettingsForm extends Model ['email', 'username'], 'unique', 'when' => function ($model, $attribute) { - return $this->getUser()->$attribute != $model->$attribute; + return $this->getUser()->$attribute !== $model->$attribute; }, 'targetClass' => $this->getClassMap()->get(User::class), ], @@ -110,7 +125,7 @@ class SettingsForm extends Model */ public function getUser() { - if ($this->user == null) { + if (null === $this->user) { $this->user = Yii::$app->user->identity; } @@ -120,7 +135,9 @@ class SettingsForm extends Model /** * Saves new account settings. * + * @throws \Exception * @return bool + * */ public function save() { @@ -130,9 +147,9 @@ class SettingsForm extends Model $user->scenario = 'settings'; $user->username = $this->username; $user->password = $this->new_password; - if ($this->email == $user->email && $user->unconfirmed_email != null) { + if ($this->email === $user->email && $user->unconfirmed_email !== null) { $user->unconfirmed_email = null; - } elseif ($this->email != $user->email) { + } elseif ($this->email !== $user->email) { $strategy = EmailChangeStrategyFactory::makeByStrategyType( $this->getModule()->emailChangeStrategy, $this diff --git a/src/User/Helper/AuthHelper.php b/src/User/Helper/AuthHelper.php index 651e560..e85e191 100644 --- a/src/User/Helper/AuthHelper.php +++ b/src/User/Helper/AuthHelper.php @@ -56,7 +56,7 @@ class AuthHelper ? Yii::$app->getUser()->can($module->administratorPermissionName) : false; - return $hasAdministratorPermissionName || in_array($username, $module->administrators); + return $hasAdministratorPermissionName || in_array($username, $module->administrators, false); } /** @@ -99,7 +99,7 @@ class AuthHelper public function getUnassignedItems(AbstractAuthItem $model) { $excludeItems = $model->item !== null ? [$model->item->name] : []; - $type = $model->getType() == Permission::TYPE_PERMISSION ? Permission::TYPE_PERMISSION : null; + $type = $model->getType() === Permission::TYPE_PERMISSION ? Permission::TYPE_PERMISSION : null; $items = $this->getAuthManager()->getItems($type, $excludeItems); return ArrayHelper::map( diff --git a/src/User/Helper/ClassMapHelper.php b/src/User/Helper/ClassMapHelper.php index fac9a3d..3ca99f8 100644 --- a/src/User/Helper/ClassMapHelper.php +++ b/src/User/Helper/ClassMapHelper.php @@ -11,14 +11,8 @@ namespace Da\User\Helper; -/** - * ModelMapHelper.php. - * - * Date: 3/12/16 - * Time: 18:10 - * - * @author Antonio Ramirez - */ +use yii\base\InvalidParamException; + class ClassMapHelper { protected $map = []; @@ -45,7 +39,7 @@ class ClassMapHelper /** * @param $key * - * @throws \Exception + * @throws InvalidParamException * @return mixed * */ @@ -54,6 +48,6 @@ class ClassMapHelper if (array_key_exists($key, $this->map)) { return $this->map[$key]; } - throw new \Exception('Unknown model map key: ' . $key); + throw new InvalidParamException('Unknown model map key: ' . $key); } } diff --git a/src/User/Helper/MigrationHelper.php b/src/User/Helper/MigrationHelper.php index ed30648..7de2c41 100644 --- a/src/User/Helper/MigrationHelper.php +++ b/src/User/Helper/MigrationHelper.php @@ -18,7 +18,9 @@ class MigrationHelper /** * @param string $driverName * + * @throws RuntimeException * @return null|string + * */ public static function resolveTableOptions($driverName) { @@ -38,7 +40,9 @@ class MigrationHelper /** * @param $driverName * + * @throws RuntimeException * @return string + * */ public static function resolveDbType($driverName) { @@ -59,10 +63,12 @@ class MigrationHelper /** * @param string $driverName * + * @throws RuntimeException * @return bool + * */ public static function isMicrosoftSQLServer($driverName) { - return self::resolveDbType($driverName) == 'sqlsrv'; + return self::resolveDbType($driverName) === 'sqlsrv'; } } diff --git a/src/User/Helper/SecurityHelper.php b/src/User/Helper/SecurityHelper.php index babff35..f540f0d 100644 --- a/src/User/Helper/SecurityHelper.php +++ b/src/User/Helper/SecurityHelper.php @@ -11,6 +11,7 @@ namespace Da\User\Helper; +use yii\base\Exception; use yii\base\Security; class SecurityHelper @@ -31,13 +32,24 @@ class SecurityHelper * @param string $password * @param null|int $cost * + * @throws Exception * @return string + * */ public function generatePasswordHash($password, $cost = null) { return $this->security->generatePasswordHash($password, $cost); } + /** + * Generates a random string + * + * @param int $length + * + * @throws Exception + * @return string + * + */ public function generateRandomString($length = 32) { return $this->security->generateRandomString($length); diff --git a/src/User/Helper/TimezoneHelper.php b/src/User/Helper/TimezoneHelper.php index 581b48f..aba5f17 100644 --- a/src/User/Helper/TimezoneHelper.php +++ b/src/User/Helper/TimezoneHelper.php @@ -13,6 +13,7 @@ namespace Da\User\Helper; use DateTime; use DateTimeZone; +use yii\base\InvalidParamException; use yii\helpers\ArrayHelper; class TimezoneHelper @@ -20,7 +21,9 @@ class TimezoneHelper /** * Get all of the time zones with the offsets sorted by their offset. * + * @throws InvalidParamException * @return array + * */ public static function getAll() { diff --git a/src/User/Migration/m000000_000002_create_profile_table.php b/src/User/Migration/m000000_000002_create_profile_table.php index 44f0490..aec68f6 100644 --- a/src/User/Migration/m000000_000002_create_profile_table.php +++ b/src/User/Migration/m000000_000002_create_profile_table.php @@ -21,7 +21,7 @@ class m000000_000002_create_profile_table extends Migration $this->createTable( '{{%profile}}', [ - 'user_id' => $this->primaryKey(), + 'user_id' => $this->integer()->notNull(), 'name' => $this->string(255), 'public_email' => $this->string(255), 'gravatar_email' => $this->string(255), @@ -34,6 +34,8 @@ class m000000_000002_create_profile_table extends Migration MigrationHelper::resolveTableOptions($this->db->driverName) ); + $this->addPrimaryKey('{{%profile_pk}}','{{%profile}}','user_id'); + $restrict = MigrationHelper::isMicrosoftSQLServer($this->db->driverName) ? 'NO ACTION' : 'RESTRICT'; $this->addForeignKey('fk_profile_user', '{{%profile}}', 'user_id', '{{%user}}', 'id', 'CASCADE', $restrict); diff --git a/src/User/Migration/m000000_000007_enable_password_expiration.php b/src/User/Migration/m000000_000007_enable_password_expiration.php new file mode 100644 index 0000000..2761688 --- /dev/null +++ b/src/User/Migration/m000000_000007_enable_password_expiration.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Da\User\Migration; + +use yii\db\Migration; + +class m000000_000007_enable_password_expiration extends Migration +{ + public function safeUp() + { + $this->addColumn('{{%user}}', 'password_changed_at', $this->integer()->null()); + } + + public function safeDown() + { + $this->dropColumn('{{%user}}', 'password_changed_at'); + } +} diff --git a/src/User/Migration/m000000_000008_add_last_login_ip.php b/src/User/Migration/m000000_000008_add_last_login_ip.php new file mode 100644 index 0000000..3bbe4f6 --- /dev/null +++ b/src/User/Migration/m000000_000008_add_last_login_ip.php @@ -0,0 +1,29 @@ +addColumn('{{%user}}', 'last_login_ip', Schema::TYPE_STRING . '(45) DEFAULT NULL AFTER last_login_at'); + } + + /** + * {@inheritdoc} + */ + public function safeDown() + { + $this->dropColumn('{{%user}}', 'last_login_ip'); + } +} diff --git a/src/User/Migration/m000000_000007_add_gdpr_consent_fields.php b/src/User/Migration/m000000_000009_add_gdpr_consent_fields.php similarity index 100% rename from src/User/Migration/m000000_000007_add_gdpr_consent_fields.php rename to src/User/Migration/m000000_000009_add_gdpr_consent_fields.php diff --git a/src/User/Model/AbstractAuthItem.php b/src/User/Model/AbstractAuthItem.php index dbee40b..9080582 100644 --- a/src/User/Model/AbstractAuthItem.php +++ b/src/User/Model/AbstractAuthItem.php @@ -108,7 +108,7 @@ abstract class AbstractAuthItem extends Model } }, 'when' => function () { - return $this->scenario == 'create' || $this->item->name != $this->name; + return $this->scenario === 'create' || $this->item->name !== $this->name; }, ], ['children', RbacItemsValidator::class], diff --git a/src/User/Model/Profile.php b/src/User/Model/Profile.php index 450c878..72c1450 100644 --- a/src/User/Model/Profile.php +++ b/src/User/Model/Profile.php @@ -20,6 +20,8 @@ use DateTime; use DateTimeZone; use Exception; use Yii; +use yii\base\InvalidConfigException; +use yii\base\InvalidParamException; use yii\db\ActiveRecord; /** @@ -41,6 +43,9 @@ class Profile extends ActiveRecord /** * {@inheritdoc} + * + * @throws InvalidParamException + * @throws InvalidConfigException */ public function beforeSave($insert) { @@ -64,6 +69,8 @@ class Profile extends ActiveRecord /** * {@inheritdoc} + * + * @throws InvalidConfigException */ public function rules() { @@ -122,6 +129,8 @@ class Profile extends ActiveRecord * Set the User's timezone. * * @param DateTimeZone $timezone + * + * @throws InvalidParamException */ public function setTimeZone(DateTimeZone $timezone) { @@ -141,6 +150,7 @@ class Profile extends ActiveRecord } /** + * @throws InvalidConfigException * @return \yii\db\ActiveQuery */ public function getUser() @@ -151,6 +161,7 @@ class Profile extends ActiveRecord /** * @param int $size * + * @throws InvalidConfigException * @return mixed */ public function getAvatarUrl($size = 200) diff --git a/src/User/Model/SocialNetworkAccount.php b/src/User/Model/SocialNetworkAccount.php index c325a50..a064103 100644 --- a/src/User/Model/SocialNetworkAccount.php +++ b/src/User/Model/SocialNetworkAccount.php @@ -15,6 +15,8 @@ use Da\User\Query\SocialNetworkAccountQuery; use Da\User\Traits\ContainerAwareTrait; use Da\User\Traits\ModuleAwareTrait; use Yii; +use yii\base\Exception; +use yii\base\InvalidParamException; use yii\db\ActiveRecord; use yii\helpers\Url; @@ -55,7 +57,7 @@ class SocialNetworkAccount extends ActiveRecord */ public function getIsConnected() { - return $this->user_id != null; + return null !== $this->user_id; } /** @@ -71,6 +73,8 @@ class SocialNetworkAccount extends ActiveRecord } /** + * @throws Exception + * @throws InvalidParamException * @return string the connection url */ public function getConnectionUrl() diff --git a/src/User/Model/Token.php b/src/User/Model/Token.php index 69651ab..27d441c 100644 --- a/src/User/Model/Token.php +++ b/src/User/Model/Token.php @@ -16,6 +16,8 @@ use Da\User\Query\TokenQuery; use Da\User\Traits\ContainerAwareTrait; use Da\User\Traits\ModuleAwareTrait; use RuntimeException; +use yii\base\InvalidConfigException; +use yii\base\InvalidParamException; use yii\db\ActiveRecord; use yii\helpers\Url; @@ -49,6 +51,9 @@ class Token extends ActiveRecord /** * {@inheritdoc} + * + * @throws InvalidParamException + * @throws InvalidConfigException */ public function beforeSave($insert) { @@ -86,6 +91,7 @@ class Token extends ActiveRecord } /** + * @throws InvalidParamException * @return string */ public function getUrl() @@ -94,16 +100,17 @@ class Token extends ActiveRecord } /** + * @throws RuntimeException * @return bool Whether token has expired */ public function getIsExpired() { - if ($this->type == static::TYPE_RECOVERY) { + if ($this->type === static::TYPE_RECOVERY) { $expirationTime = $this->getModule()->tokenRecoveryLifespan; } elseif ($this->type >= static::TYPE_CONFIRMATION && $this->type <= static::TYPE_CONFIRM_OLD_EMAIL) { $expirationTime = $this->getModule()->tokenConfirmationLifespan; } else { - throw new RuntimeException(); + throw new RuntimeException('Unknown Token type.'); } return ($this->created_at + $expirationTime) < time(); diff --git a/src/User/Model/User.php b/src/User/Model/User.php index ae16e95..4b93923 100644 --- a/src/User/Model/User.php +++ b/src/User/Model/User.php @@ -16,6 +16,9 @@ use Da\User\Query\UserQuery; use Da\User\Traits\ContainerAwareTrait; use Da\User\Traits\ModuleAwareTrait; use Yii; +use yii\base\Exception; +use yii\base\InvalidConfigException; +use yii\base\InvalidParamException; use yii\base\NotSupportedException; use yii\behaviors\TimestampBehavior; use yii\db\ActiveRecord; @@ -41,14 +44,20 @@ use yii\web\IdentityInterface; * @property string $auth_key * @property string $auth_tf_key * @property int $auth_tf_enabled - * @property int $registration_ip + * @property string $registration_ip * @property int $confirmed_at * @property int $blocked_at * @property int $flags * @property int $created_at * @property int $updated_at * @property int $last_login_at +<<<<<<< HEAD * @property int $gdpr_consent_date date of agreement of data processing + * ======= + * @property string $last_login_ip + * @property int $password_changed_at + * @property int $password_age +>>>>>>> upstream/master * * Defined relations: * @property SocialNetworkAccount[] $socialNetworkAccounts @@ -74,6 +83,10 @@ class User extends ActiveRecord implements IdentityInterface /** * {@inheritdoc} + * + * @throws InvalidParamException + * @throws InvalidConfigException + * @throws Exception */ public static function tableName() { @@ -98,6 +111,8 @@ class User extends ActiveRecord implements IdentityInterface /** * {@inheritdoc} + * + * @throws NotSupportedException */ public static function findIdentityByAccessToken($token, $type = null) { @@ -123,6 +138,7 @@ class User extends ActiveRecord implements IdentityInterface 'password_hash', $security->generatePasswordHash($this->password, $this->getModule()->blowfishCost) ); + $this->password_changed_at = time(); } return parent::beforeSave($insert); @@ -130,6 +146,8 @@ class User extends ActiveRecord implements IdentityInterface /** * @inheritdoc + * + * @throws InvalidConfigException */ public function afterSave($insert, $changedAttributes) { @@ -174,7 +192,10 @@ class User extends ActiveRecord implements IdentityInterface 'password' => Yii::t('usuario', 'Password'), 'created_at' => Yii::t('usuario', 'Registration time'), 'confirmed_at' => Yii::t('usuario', 'Confirmation time'), - 'last_login_at' => Yii::t('usuario', 'Last login'), + 'last_login_at' => Yii::t('usuario', 'Last login time'), + 'last_login_ip' => Yii::t('usuario', 'Last login IP'), + 'password_changed_at' => Yii::t('usuario', 'Last password change'), + 'password_age' => Yii::t('usuario', 'Password age'), ]; } @@ -203,7 +224,7 @@ class User extends ActiveRecord implements IdentityInterface return [ // username rules 'usernameRequired' => ['username', 'required', 'on' => ['register', 'create', 'connect', 'update']], - 'usernameMatch' => ['username', 'match', 'pattern' => '/^[-a-zA-Z0-9_\.@]+$/'], + 'usernameMatch' => ['username', 'match', 'pattern' => '/^[-a-zA-Z0-9_\.@\+]+$/'], 'usernameLength' => ['username', 'string', 'min' => 3, 'max' => 255], 'usernameTrim' => ['username', 'trim'], 'usernameUnique' => [ @@ -268,6 +289,7 @@ class User extends ActiveRecord implements IdentityInterface } /** + * @throws InvalidConfigException * @return bool whether the user is an admin or not */ public function getIsAdmin() @@ -297,6 +319,8 @@ class User extends ActiveRecord implements IdentityInterface } /** + * @throws InvalidConfigException + * @throws InvalidParamException * @return \yii\db\ActiveQuery */ public function getProfile() @@ -305,11 +329,13 @@ class User extends ActiveRecord implements IdentityInterface } /** + * @throws \Exception * @return SocialNetworkAccount[] social connected accounts [ 'providerName' => socialAccountModel ] + * */ public function getSocialNetworkAccounts() { - if ($this->connectedAccounts == null) { + if (null === $this->connectedAccounts) { /** @var SocialNetworkAccount[] $accounts */ $accounts = $this->hasMany( $this->getClassMap() @@ -325,4 +351,18 @@ class User extends ActiveRecord implements IdentityInterface return $this->connectedAccounts; } + + /** + * Returns password age in days + * @return integer + */ + public function getPassword_age() + { + if (is_null($this->password_changed_at)) { + return $this->getModule()->maxPasswordAge; + } + $d = new \DateTime("@{$this->password_changed_at}"); + + return $d->diff(new \DateTime(), true)->format("%a"); + } } diff --git a/src/User/Module.php b/src/User/Module.php index 0e8ceef..aa2935f 100644 --- a/src/User/Module.php +++ b/src/User/Module.php @@ -65,6 +65,10 @@ class Module extends BaseModule * @see http://2fa-library.readthedocs.io/en/latest/ */ public $twoFactorAuthenticationCycles = 1; + /** + * @var bool whether to allow auto login or not + */ + public $enableAutoLogin = true; /** * @var bool whether to allow registration process or not */ @@ -93,6 +97,10 @@ class Module extends BaseModule * @var bool whether to enable password recovery or not */ public $allowPasswordRecovery = true; + /** + * @var bool whether to enable password recovery from the admin console + */ + public $allowAdminPasswordRecovery = true; /** * @var bool whether user can remove his account */ @@ -161,4 +169,8 @@ class Module extends BaseModule * @var string the session key name to impersonate users. Please, modify it for security reasons! */ public $switchIdentitySessionKey = 'yuik_usuario'; + /** + * @var integer If != NULL sets a max password age in days + */ + public $maxPasswordAge = null; } diff --git a/src/User/Query/SocialNetworkAccountQuery.php b/src/User/Query/SocialNetworkAccountQuery.php index 8ca2843..eee6d34 100644 --- a/src/User/Query/SocialNetworkAccountQuery.php +++ b/src/User/Query/SocialNetworkAccountQuery.php @@ -26,7 +26,7 @@ class SocialNetworkAccountQuery extends ActiveQuery return $this->andWhere( [ 'provider' => $client->getId(), - 'client_id' => $client->getUserAttributes()['id'], + 'client_id' => (string)$client->getUserAttributes()['id'], ] ); } diff --git a/src/User/Search/RuleSearch.php b/src/User/Search/RuleSearch.php index af460e3..d56b855 100644 --- a/src/User/Search/RuleSearch.php +++ b/src/User/Search/RuleSearch.php @@ -13,6 +13,8 @@ namespace Da\User\Search; use Da\User\Model\Rule; use Da\User\Traits\ContainerAwareTrait; +use yii\base\InvalidConfigException; +use yii\base\InvalidParamException; use yii\base\Model; use yii\data\ActiveDataProvider; use yii\db\Query; @@ -47,6 +49,8 @@ class RuleSearch extends Rule /** * @param array $params * + * @throws InvalidConfigException + * @throws InvalidParamException * @return ActiveDataProvider */ public function search(array $params = []) @@ -62,8 +66,6 @@ class RuleSearch extends Rule if (!$this->validate()) { $query->where('0=1'); - var_dump($this->load($params)); - die(); } return $this->make( diff --git a/src/User/Search/UserSearch.php b/src/User/Search/UserSearch.php index a604c2f..d8e5085 100644 --- a/src/User/Search/UserSearch.php +++ b/src/User/Search/UserSearch.php @@ -13,6 +13,7 @@ namespace Da\User\Search; use Da\User\Query\UserQuery; use Yii; +use yii\base\InvalidParamException; use yii\base\Model; use yii\data\ActiveDataProvider; @@ -38,6 +39,10 @@ class UserSearch extends Model * @var string */ public $registration_ip; + /** + * @var string + */ + public $last_login_ip; /** * @var UserQuery */ @@ -61,8 +66,8 @@ class UserSearch extends Model public function rules() { return [ - 'safeFields' => [['username', 'email', 'registration_ip', 'created_at', 'last_login_at'], 'safe'], - 'createdDefault' => ['created_at', 'default', 'value' => null], + 'safeFields' => [['username', 'email', 'registration_ip', 'created_at', 'last_login_at, last_login_ip'], 'safe'], + 'createdDefault' => [['created_at', 'last_login_at'], 'default', 'value' => null], ]; } @@ -76,13 +81,15 @@ class UserSearch extends Model 'email' => Yii::t('usuario', 'Email'), 'created_at' => Yii::t('usuario', 'Registration time'), 'registration_ip' => Yii::t('usuario', 'Registration IP'), - 'last_login_at' => Yii::t('usuario', 'Last login'), + 'last_login_at' => Yii::t('usuario', 'Last login time'), + 'last_login_ip' => Yii::t('usuario', 'Last login IP'), ]; } /** * @param $params * + * @throws InvalidParamException * @return ActiveDataProvider */ public function search($params) @@ -112,7 +119,8 @@ class UserSearch extends Model $query ->andFilterWhere(['like', 'username', $this->username]) ->andFilterWhere(['like', 'email', $this->email]) - ->andFilterWhere(['registration_ip' => $this->registration_ip]); + ->andFilterWhere(['registration_ip' => $this->registration_ip]) + ->andFilterWhere(['last_login_ip' => $this->last_login_ip]); return $dataProvider; } diff --git a/src/User/Service/AuthRuleEditionService.php b/src/User/Service/AuthRuleEditionService.php index 8ff4254..55983d7 100644 --- a/src/User/Service/AuthRuleEditionService.php +++ b/src/User/Service/AuthRuleEditionService.php @@ -31,14 +31,14 @@ class AuthRuleEditionService implements ServiceInterface public function run() { - if (!$this->model->validate() || (!in_array($this->model->scenario, ['create', 'update']))) { + if (!$this->model->validate() || (!in_array($this->model->scenario, ['create', 'update'], false))) { return false; } $rule = $this->make($this->model->className, [], ['name' => $this->model->name]); try { - if ($this->model->scenario == 'create') { + if ($this->model->scenario === 'create') { $this->getAuthManager()->add($rule); } else { $this->getAuthManager()->update($this->model->previousName, $rule); diff --git a/src/User/Service/EmailChangeService.php b/src/User/Service/EmailChangeService.php index 88d568c..3400846 100644 --- a/src/User/Service/EmailChangeService.php +++ b/src/User/Service/EmailChangeService.php @@ -76,8 +76,8 @@ class EmailChangeService implements ServiceInterface ); } } - if ($this->getModule()->emailChangeStrategy === MailChangeStrategyInterface::TYPE_DEFAULT - || ($this->model->flags & User::NEW_EMAIL_CONFIRMED & $this->model->flags & User::OLD_EMAIL_CONFIRMED) + if (($this->model->flags & User::NEW_EMAIL_CONFIRMED & $this->model->flags & User::OLD_EMAIL_CONFIRMED) + || $this->getModule()->emailChangeStrategy === MailChangeStrategyInterface::TYPE_DEFAULT ) { $this->model->email = $this->model->unconfirmed_email; $this->model->unconfirmed_email = null; diff --git a/src/User/Service/MailService.php b/src/User/Service/MailService.php index a3c2414..a0dfd0d 100644 --- a/src/User/Service/MailService.php +++ b/src/User/Service/MailService.php @@ -20,6 +20,7 @@ class MailService implements ServiceInterface { protected $viewPath = '@Da/User/resources/views/mail'; + protected $type; protected $from; protected $to; protected $subject; @@ -30,15 +31,17 @@ class MailService implements ServiceInterface /** * MailService constructor. * - * @param string $from - * @param string $to - * @param string $subject - * @param string $view - * @param array $params - * @param BaseMailer|MailerInterface $mailer + * @param string $type the mailer type + * @param string $from from email account + * @param string $to to email account + * @param string $subject the email subject + * @param string $view the view to render mail + * @param array $params view parameters + * @param BaseMailer|MailerInterface $mailer mailer interface */ - public function __construct($from, $to, $subject, $view, array $params, MailerInterface $mailer) + public function __construct($type, $from, $to, $subject, $view, array $params, MailerInterface $mailer) { + $this->type = $type; $this->from = $from; $this->to = $to; $this->subject = $subject; @@ -62,6 +65,15 @@ class MailService implements ServiceInterface return $this; } + /** + * gets mailer type + * @return string + */ + public function getType() + { + return $this->type; + } + /** * @return bool */ diff --git a/src/User/Service/PasswordExpireService.php b/src/User/Service/PasswordExpireService.php new file mode 100644 index 0000000..d3487fc --- /dev/null +++ b/src/User/Service/PasswordExpireService.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Da\User\Service; + +use Yii; +use Da\User\Contracts\ServiceInterface; +use Da\User\Model\User; + +class PasswordExpireService implements ServiceInterface +{ + protected $model; + + public function __construct(User $model) + { + $this->model = $model; + } + + public function run() + { + return $this->model->updateAttributes([ + 'last_login_at' => time(), + 'last_login_ip' => Yii::$app->request->getUserIP(), + ]); + } +} diff --git a/src/User/Service/PasswordRecoveryService.php b/src/User/Service/PasswordRecoveryService.php index ec0733b..032257e 100644 --- a/src/User/Service/PasswordRecoveryService.php +++ b/src/User/Service/PasswordRecoveryService.php @@ -13,28 +13,29 @@ namespace Da\User\Service; use Da\User\Contracts\ServiceInterface; use Da\User\Factory\TokenFactory; -use Da\User\Model\Token; use Da\User\Model\User; use Da\User\Query\UserQuery; +use Da\User\Traits\MailAwareTrait; +use Da\User\Traits\ModuleAwareTrait; use Exception; use Yii; -use yii\log\Logger; class PasswordRecoveryService implements ServiceInterface { + use MailAwareTrait; + use ModuleAwareTrait; + protected $query; protected $email; protected $mailService; protected $securityHelper; - protected $logger; - public function __construct($email, MailService $mailService, UserQuery $query, Logger $logger) + public function __construct($email, MailService $mailService, UserQuery $query) { $this->email = $email; $this->mailService = $mailService; $this->query = $query; - $this->logger = $logger; } public function run() @@ -43,6 +44,10 @@ class PasswordRecoveryService implements ServiceInterface /** @var User $user */ $user = $this->query->whereEmail($this->email)->one(); + if ($user === null) { + throw new \RuntimeException('User not found.'); + } + $token = TokenFactory::makeRecoveryToken($user->id); if (!$token) { @@ -51,18 +56,20 @@ class PasswordRecoveryService implements ServiceInterface $this->mailService->setViewParam('user', $user); $this->mailService->setViewParam('token', $token); - if (!$this->mailService->run()) { + if (!$this->sendMail($user)) { return false; } - Yii::$app->session->setFlash( - 'info', - Yii::t('usuario', 'An email has been sent with instructions for resetting your password') - ); + 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) { - $this->logger->log($e->getMessage(), Logger::LEVEL_ERROR); + Yii::error($e->getMessage(), 'usuario'); return false; } diff --git a/src/User/Service/ResendConfirmationService.php b/src/User/Service/ResendConfirmationService.php index 119d495..7c131d9 100644 --- a/src/User/Service/ResendConfirmationService.php +++ b/src/User/Service/ResendConfirmationService.php @@ -14,19 +14,19 @@ namespace Da\User\Service; use Da\User\Contracts\ServiceInterface; use Da\User\Factory\TokenFactory; use Da\User\Model\User; -use yii\log\Logger; +use Da\User\Traits\MailAwareTrait; class ResendConfirmationService implements ServiceInterface { + use MailAwareTrait; + protected $model; protected $mailService; - protected $logger; - public function __construct(User $model, MailService $mailService, Logger $logger) + public function __construct(User $model, MailService $mailService) { $this->model = $model; $this->mailService = $mailService; - $this->logger = $logger; } public function run() @@ -35,7 +35,7 @@ class ResendConfirmationService implements ServiceInterface $token = TokenFactory::makeConfirmationToken($this->model->id); $this->mailService->setViewParam('token', $token); - return $this->mailService->run(); + return $this->sendMail($this->model); } return false; diff --git a/src/User/Service/TwoFactorQrCodeUriGeneratorService.php b/src/User/Service/TwoFactorQrCodeUriGeneratorService.php index e407b66..0492bdc 100644 --- a/src/User/Service/TwoFactorQrCodeUriGeneratorService.php +++ b/src/User/Service/TwoFactorQrCodeUriGeneratorService.php @@ -47,8 +47,7 @@ class TwoFactorQrCodeUriGeneratorService implements ServiceInterface } $totpUri = (new TOTPSecretKeyUriGeneratorService(Yii::$app->name, $user->email, $user->auth_tf_key))->run(); - $dataUri = (new QrCodeDataUriGeneratorService($totpUri))->run(); - return $dataUri; + return (new QrCodeDataUriGeneratorService($totpUri))->run(); } } diff --git a/src/User/Service/UserConfirmationService.php b/src/User/Service/UserConfirmationService.php index f0715b8..aa18f4b 100644 --- a/src/User/Service/UserConfirmationService.php +++ b/src/User/Service/UserConfirmationService.php @@ -14,9 +14,12 @@ namespace Da\User\Service; use Da\User\Contracts\ServiceInterface; use Da\User\Event\UserEvent; use Da\User\Model\User; +use Da\User\Traits\MailAwareTrait; class UserConfirmationService implements ServiceInterface { + use MailAwareTrait; + protected $model; public function __construct(User $model) @@ -26,9 +29,12 @@ class UserConfirmationService implements ServiceInterface public function run() { - $this->model->trigger(UserEvent::EVENT_BEFORE_CONFIRMATION); + $model = $this->model; + $event = $this->make(UserEvent::class, [$model]); + + $this->model->trigger(UserEvent::EVENT_BEFORE_CONFIRMATION, $event); if ((bool)$this->model->updateAttributes(['confirmed_at' => time()])) { - $this->model->trigger(UserEvent::EVENT_AFTER_CONFIRMATION); + $this->model->trigger(UserEvent::EVENT_AFTER_CONFIRMATION, $event); return true; } diff --git a/src/User/Service/UserCreateService.php b/src/User/Service/UserCreateService.php index 0cab543..3705b33 100644 --- a/src/User/Service/UserCreateService.php +++ b/src/User/Service/UserCreateService.php @@ -15,27 +15,31 @@ use Da\User\Contracts\ServiceInterface; use Da\User\Event\UserEvent; use Da\User\Helper\SecurityHelper; use Da\User\Model\User; +use Da\User\Traits\MailAwareTrait; use Exception; +use Yii; use yii\base\InvalidCallException; -use yii\log\Logger; class UserCreateService implements ServiceInterface { + use MailAwareTrait; + protected $model; protected $securityHelper; protected $mailService; - protected $logger; - public function __construct(User $model, MailService $mailService, SecurityHelper $securityHelper, Logger $logger) + public function __construct(User $model, MailService $mailService, SecurityHelper $securityHelper) { $this->model = $model; $this->mailService = $mailService; $this->securityHelper = $securityHelper; - $this->logger = $logger; } /** + * @throws InvalidCallException + * @throws \yii\db\Exception * @return bool + * */ public function run() { @@ -45,7 +49,7 @@ class UserCreateService implements ServiceInterface throw new InvalidCallException('Cannot create a new user from an existing one.'); } - $transaction = $model->getDb()->beginTransaction(); + $transaction = $model::getDb()->beginTransaction(); try { $model->confirmed_at = time(); @@ -53,23 +57,32 @@ class UserCreateService implements ServiceInterface ? $model->password : $this->securityHelper->generatePassword(8); - $model->trigger(UserEvent::EVENT_BEFORE_CREATE); + $event = $this->make(UserEvent::class, [$model]); + $model->trigger(UserEvent::EVENT_BEFORE_CREATE, $event); if (!$model->save()) { $transaction->rollBack(); - return false; } - $model->trigger(UserEvent::EVENT_AFTER_CREATE); - - $this->mailService->run(); + $model->trigger(UserEvent::EVENT_AFTER_CREATE, $event); + if (!$this->sendMail($model)) { + Yii::$app->session->setFlash( + 'warning', + Yii::t( + 'usuario', + 'Error sending welcome message to "{email}". Please try again later.', + ['email' => $model->email] + ) + ); + $transaction->rollBack(); + return false; + } $transaction->commit(); - return true; } catch (Exception $e) { $transaction->rollBack(); - $this->logger->log($e->getMessage(), Logger::LEVEL_ERROR); + Yii::error($e->getMessage(), 'usuario'); return false; } diff --git a/src/User/Service/UserRegisterService.php b/src/User/Service/UserRegisterService.php index 9e79dda..eb15983 100644 --- a/src/User/Service/UserRegisterService.php +++ b/src/User/Service/UserRegisterService.php @@ -16,28 +16,26 @@ use Da\User\Event\UserEvent; use Da\User\Factory\TokenFactory; use Da\User\Helper\SecurityHelper; use Da\User\Model\User; -use Da\User\Traits\ContainerAwareTrait; +use Da\User\Traits\MailAwareTrait; use Da\User\Traits\ModuleAwareTrait; use Exception; +use Yii; use yii\base\InvalidCallException; -use yii\log\Logger; class UserRegisterService implements ServiceInterface { use ModuleAwareTrait; - use ContainerAwareTrait; + use MailAwareTrait; protected $model; protected $securityHelper; protected $mailService; - protected $logger; - public function __construct(User $model, MailService $mailService, SecurityHelper $securityHelper, Logger $logger) + public function __construct(User $model, MailService $mailService, SecurityHelper $securityHelper) { $this->model = $model; $this->mailService = $mailService; $this->securityHelper = $securityHelper; - $this->logger = $logger; } public function run() @@ -48,7 +46,7 @@ class UserRegisterService implements ServiceInterface throw new InvalidCallException('Cannot register user from an existing one.'); } - $transaction = $model->getDb()->beginTransaction(); + $transaction = $model::getDb()->beginTransaction(); try { $model->confirmed_at = $this->getModule()->enableEmailConfirmation ? null : time(); @@ -61,7 +59,6 @@ class UserRegisterService implements ServiceInterface if (!$model->save()) { $transaction->rollBack(); - return false; } @@ -72,8 +69,18 @@ class UserRegisterService implements ServiceInterface if (isset($token)) { $this->mailService->setViewParam('token', $token); } - $this->mailService->run(); - + if (!$this->sendMail($model)) { + Yii::$app->session->setFlash( + 'warning', + Yii::t( + 'usuario', + 'Error sending registration message to "{email}". Please try again later.', + ['email' => $model->email] + ) + ); + $transaction->rollBack(); + return false; + } $model->trigger(UserEvent::EVENT_AFTER_REGISTER, $event); $transaction->commit(); @@ -81,7 +88,7 @@ class UserRegisterService implements ServiceInterface return true; } catch (Exception $e) { $transaction->rollBack(); - $this->logger->log($e->getMessage(), Logger::LEVEL_ERROR); + Yii::error($e->getMessage(), 'usuario'); return false; } diff --git a/src/User/Traits/ContainerAwareTrait.php b/src/User/Traits/ContainerAwareTrait.php index 8bac337..67baa3f 100644 --- a/src/User/Traits/ContainerAwareTrait.php +++ b/src/User/Traits/ContainerAwareTrait.php @@ -14,6 +14,7 @@ namespace Da\User\Traits; use Da\User\Helper\AuthHelper; use Da\User\Helper\ClassMapHelper; use Yii; +use yii\base\InvalidConfigException; use yii\di\Container; /** @@ -39,6 +40,7 @@ trait ContainerAwareTrait * @param array $params constructor parameters * @param array $config attributes * + * @throws InvalidConfigException * @return object */ public function make($class, $params = [], $config = []) @@ -47,7 +49,9 @@ trait ContainerAwareTrait } /** + * @throws InvalidConfigException * @return \Da\User\Helper\AuthHelper|object + * */ public function getAuth() { @@ -55,7 +59,9 @@ trait ContainerAwareTrait } /** + * @throws InvalidConfigException * @return \Da\User\Helper\ClassMapHelper|object + * */ public function getClassMap() { diff --git a/src/User/Traits/MailAwareTrait.php b/src/User/Traits/MailAwareTrait.php new file mode 100644 index 0000000..a823c48 --- /dev/null +++ b/src/User/Traits/MailAwareTrait.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +namespace Da\User\Traits; + +use Da\User\Event\MailEvent; +use Da\User\Model\User; +use Da\User\Service\MailService; +use Exception; +use Yii; +use yii\base\InvalidConfigException; + +/** + * @property MailService $mailService + */ +trait MailAwareTrait +{ + use ContainerAwareTrait; + + /** + * Sends a mailer + * + * @param User $user + * + * @throws InvalidConfigException + * @return bool + */ + protected function sendMail(User $user) + { + $type = $this->mailService->getType(); + $event = $this->make(MailEvent::class, [$type, $user, $this->mailService, null]); + $user->trigger(MailEvent::EVENT_BEFORE_SEND_MAIL, $event); + try { + $this->mailService->run(); + } catch (Exception $e) { + $event = $this->make(MailEvent::class, [$type, $user, $this->mailService, $e]); + Yii::error($e->getMessage(), 'usuario'); + $user->trigger(MailEvent::EVENT_AFTER_SEND_MAIL, $event); + return false; + } + $user->trigger(MailEvent::EVENT_AFTER_SEND_MAIL, $event); + return true; + } +} diff --git a/src/User/Validator/RbacItemsValidator.php b/src/User/Validator/RbacItemsValidator.php index 60261ca..45d06c2 100644 --- a/src/User/Validator/RbacItemsValidator.php +++ b/src/User/Validator/RbacItemsValidator.php @@ -26,7 +26,7 @@ class RbacItemsValidator extends Validator } foreach ($value as $item) { - if ($this->getAuthManager()->getItem($item) == null) { + if ($this->getAuthManager()->getItem($item) === null) { return [Yii::t('usuario', 'There is neither role nor permission with name "{0}"', [$item]), []]; } } diff --git a/src/User/Validator/RbacRuleNameValidator.php b/src/User/Validator/RbacRuleNameValidator.php index 0089f82..edb5f9f 100644 --- a/src/User/Validator/RbacRuleNameValidator.php +++ b/src/User/Validator/RbacRuleNameValidator.php @@ -30,7 +30,7 @@ class RbacRuleNameValidator extends Validator */ protected function validateValue($value) { - if ($this->previousName != $value) { + if ($this->previousName !== $value) { $rule = $this->getAuthManager()->getRule($value); if ($rule instanceof Rule) { diff --git a/src/User/Validator/ReCaptchaValidator.php b/src/User/Validator/ReCaptchaValidator.php index 56f646f..79f6d2e 100644 --- a/src/User/Validator/ReCaptchaValidator.php +++ b/src/User/Validator/ReCaptchaValidator.php @@ -13,6 +13,7 @@ namespace Da\User\Validator; use Da\User\Component\ReCaptchaComponent; use Yii; +use yii\base\InvalidConfigException; use yii\validators\Validator; class ReCaptchaValidator extends Validator @@ -52,6 +53,8 @@ class ReCaptchaValidator extends Validator /** * @inheritdoc + * + * @throws InvalidConfigException */ protected function validateValue($value) { diff --git a/src/User/Validator/TimeZoneValidator.php b/src/User/Validator/TimeZoneValidator.php index 6f91641..387ac83 100644 --- a/src/User/Validator/TimeZoneValidator.php +++ b/src/User/Validator/TimeZoneValidator.php @@ -24,6 +24,6 @@ class TimeZoneValidator implements ValidatorInterface public function validate() { - return in_array($this->timezone, timezone_identifiers_list()); + return in_array($this->timezone, timezone_identifiers_list(), false); } } diff --git a/src/User/Validator/TwoFactorCodeValidator.php b/src/User/Validator/TwoFactorCodeValidator.php index fe9822d..9308390 100644 --- a/src/User/Validator/TwoFactorCodeValidator.php +++ b/src/User/Validator/TwoFactorCodeValidator.php @@ -11,6 +11,7 @@ namespace Da\User\Validator; +use Da\TwoFA\Exception\InvalidSecretKeyException; use Da\TwoFA\Manager; use Da\User\Contracts\ValidatorInterface; use Da\User\Model\User; @@ -36,7 +37,9 @@ class TwoFactorCodeValidator implements ValidatorInterface } /** + * @throws InvalidSecretKeyException * @return bool|int + * */ public function validate() { diff --git a/src/User/Widget/AssignmentsWidget.php b/src/User/Widget/AssignmentsWidget.php index 646ae81..1ef18fc 100644 --- a/src/User/Widget/AssignmentsWidget.php +++ b/src/User/Widget/AssignmentsWidget.php @@ -16,6 +16,7 @@ use Da\User\Service\UpdateAuthAssignmentsService; use Da\User\Traits\AuthManagerAwareTrait; use Da\User\Traits\ContainerAwareTrait; use yii\base\InvalidConfigException; +use yii\base\InvalidParamException; use yii\base\Widget; use yii\helpers\ArrayHelper; @@ -48,6 +49,9 @@ class AssignmentsWidget extends Widget /** * {@inheritdoc} + * + * @throws InvalidParamException + * @throws InvalidConfigException */ public function run() { diff --git a/src/User/Widget/ConnectWidget.php b/src/User/Widget/ConnectWidget.php index 3910c48..03f1784 100644 --- a/src/User/Widget/ConnectWidget.php +++ b/src/User/Widget/ConnectWidget.php @@ -15,6 +15,7 @@ use Yii; use yii\authclient\ClientInterface; use yii\authclient\widgets\AuthChoice; use yii\authclient\widgets\AuthChoiceAsset; +use yii\base\InvalidParamException; use yii\helpers\Html; use yii\helpers\Url; @@ -40,6 +41,8 @@ class ConnectWidget extends AuthChoice /** * {@inheritdoc} + * + * @throws InvalidParamException */ public function createClientUrl($provider) { @@ -59,6 +62,6 @@ class ConnectWidget extends AuthChoice */ public function isConnected(ClientInterface $provider) { - return $this->accounts != null && isset($this->accounts[$provider->getId()]); + return null !== $this->accounts && isset($this->accounts[$provider->getId()]); } } diff --git a/src/User/Widget/LoginWidget.php b/src/User/Widget/LoginWidget.php index 5b05288..f4d2a54 100644 --- a/src/User/Widget/LoginWidget.php +++ b/src/User/Widget/LoginWidget.php @@ -22,7 +22,7 @@ class LoginWidget extends Widget public function run() { return $this->render( - '/widgets/login', + '@Da/User/resources/views/widgets/login/form', [ 'model' => Yii::createObject(LoginForm::class), ] diff --git a/src/User/Widget/ReCaptchaWidget.php b/src/User/Widget/ReCaptchaWidget.php index 7f8883a..dfae5ce 100644 --- a/src/User/Widget/ReCaptchaWidget.php +++ b/src/User/Widget/ReCaptchaWidget.php @@ -49,10 +49,12 @@ class ReCaptchaWidget extends InputWidget /** * @inheritdoc + * + * @throws InvalidConfigException */ public function init() { - if (Yii::$app->get('recaptcha')) { + if (!Yii::$app->get('recaptcha')) { throw new InvalidConfigException(Yii::t('usuario', 'The "recaptcha" component must be configured.')); } @@ -63,6 +65,8 @@ class ReCaptchaWidget extends InputWidget /** * @inheritdoc + * + * @throws InvalidConfigException */ public function run() { @@ -78,6 +82,7 @@ class ReCaptchaWidget extends InputWidget } /** + * @throws InvalidConfigException * @return array the google recaptcha options. */ protected function getCaptchaOptions() @@ -156,7 +161,7 @@ class ReCaptchaWidget extends InputWidget 'pt-PT' ]; - return in_array($language, $except) + return in_array($language, $except, false) ? $language : substr($language, 0, strpos($language, '-')); } diff --git a/src/User/resources/i18n/ca/usuario.php b/src/User/resources/i18n/ca/usuario.php index 5b39d05..89759e9 100644 --- a/src/User/resources/i18n/ca/usuario.php +++ b/src/User/resources/i18n/ca/usuario.php @@ -35,6 +35,7 @@ return [ 'Are you sure you want to delete this user?' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you want to unblock this user?' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', 'Are you sure? Deleted user can not be restored' => '', 'Are you sure? There is no going back' => '', 'Assignments' => '', @@ -88,18 +89,20 @@ return [ 'Deleted by GDPR request' => '', 'Description' => '', 'Didn\'t receive confirmation message?' => '', - 'Disable Two-Factor Auth' => '', + 'Disable two factor authentication' => '', 'Disconnect' => '', 'Don\'t have an account? Sign up!' => '', 'Download my data' => '', 'Email' => '', 'Email (public)' => '', 'Enable' => '', - 'Enable Two-factor auth' => '', + 'Enable two factor authentication' => '', 'Error occurred while changing password' => '', 'Error occurred while confirming user' => '', 'Error occurred while deleting user' => '', 'Export my data' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -118,6 +121,7 @@ return [ 'Invalid or expired link' => '', 'Invalid password' => '', 'Invalid two-factor code' => '', + 'Invalid two factor authentication code' => '', 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', @@ -174,6 +178,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', 'Something went wrong' => '', @@ -189,23 +194,23 @@ return [ 'This username has already been taken' => '', 'This will disable two-factor auth. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', + 'This will disable two factor authentication. Are you sure?' => '', 'Time zone' => '', 'Time zone is not valid' => '', - 'Two Factor Authentication' => '', - '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' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', 'Unable to confirm user. Please, try again.' => '', 'Unable to create an account.' => '', 'Unable to create authorization item.' => '', 'Unable to create new authorization rule.' => '', 'Unable to delete user. Please, try again later.' => '', - 'Unable to disable two-factor authorization.' => '', + 'Unable to disable Two factor authentication.' => '', 'Unable to remove authorization item.' => '', 'Unable to send confirmation link' => '', + 'Unable to send recovery message to the user' => '', 'Unable to update authorization item.' => '', 'Unable to update authorization rule.' => '', 'Unable to update block status.' => '', @@ -218,7 +223,9 @@ return [ 'Update rule' => '', 'Update user account' => '', 'Updated at' => '', + 'User account could not be created.' => '', 'User block status has been updated.' => '', + 'User could not be registered.' => '', 'User has been confirmed' => '', 'User has been created' => '', 'User has been deleted' => '', @@ -262,9 +269,19 @@ return [ 'Class "{0}" does not exist' => '@@@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', 'Registration ip' => '@@@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@@@', ]; diff --git a/src/User/resources/i18n/config.php b/src/User/resources/i18n/config.php index 57bd346..30f9380 100644 --- a/src/User/resources/i18n/config.php +++ b/src/User/resources/i18n/config.php @@ -33,7 +33,7 @@ return [ 'ro', 'ru', 'th', - 'tr_TR', + 'tr-TR', 'uk', 'vi', 'zh-CN', diff --git a/src/User/resources/i18n/da/usuario.php b/src/User/resources/i18n/da/usuario.php index 5b39d05..89759e9 100644 --- a/src/User/resources/i18n/da/usuario.php +++ b/src/User/resources/i18n/da/usuario.php @@ -35,6 +35,7 @@ return [ 'Are you sure you want to delete this user?' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you want to unblock this user?' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', 'Are you sure? Deleted user can not be restored' => '', 'Are you sure? There is no going back' => '', 'Assignments' => '', @@ -88,18 +89,20 @@ return [ 'Deleted by GDPR request' => '', 'Description' => '', 'Didn\'t receive confirmation message?' => '', - 'Disable Two-Factor Auth' => '', + 'Disable two factor authentication' => '', 'Disconnect' => '', 'Don\'t have an account? Sign up!' => '', 'Download my data' => '', 'Email' => '', 'Email (public)' => '', 'Enable' => '', - 'Enable Two-factor auth' => '', + 'Enable two factor authentication' => '', 'Error occurred while changing password' => '', 'Error occurred while confirming user' => '', 'Error occurred while deleting user' => '', 'Export my data' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -118,6 +121,7 @@ return [ 'Invalid or expired link' => '', 'Invalid password' => '', 'Invalid two-factor code' => '', + 'Invalid two factor authentication code' => '', 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', @@ -174,6 +178,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', 'Something went wrong' => '', @@ -189,23 +194,23 @@ return [ 'This username has already been taken' => '', 'This will disable two-factor auth. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', + 'This will disable two factor authentication. Are you sure?' => '', 'Time zone' => '', 'Time zone is not valid' => '', - 'Two Factor Authentication' => '', - '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' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', 'Unable to confirm user. Please, try again.' => '', 'Unable to create an account.' => '', 'Unable to create authorization item.' => '', 'Unable to create new authorization rule.' => '', 'Unable to delete user. Please, try again later.' => '', - 'Unable to disable two-factor authorization.' => '', + 'Unable to disable Two factor authentication.' => '', 'Unable to remove authorization item.' => '', 'Unable to send confirmation link' => '', + 'Unable to send recovery message to the user' => '', 'Unable to update authorization item.' => '', 'Unable to update authorization rule.' => '', 'Unable to update block status.' => '', @@ -218,7 +223,9 @@ return [ 'Update rule' => '', 'Update user account' => '', 'Updated at' => '', + 'User account could not be created.' => '', 'User block status has been updated.' => '', + 'User could not be registered.' => '', 'User has been confirmed' => '', 'User has been created' => '', 'User has been deleted' => '', @@ -262,9 +269,19 @@ return [ 'Class "{0}" does not exist' => '@@@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', 'Registration ip' => '@@@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@@@', ]; diff --git a/src/User/resources/i18n/de-DU/usuario.php b/src/User/resources/i18n/de-DU/usuario.php index 5b39d05..89759e9 100644 --- a/src/User/resources/i18n/de-DU/usuario.php +++ b/src/User/resources/i18n/de-DU/usuario.php @@ -35,6 +35,7 @@ return [ 'Are you sure you want to delete this user?' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you want to unblock this user?' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', 'Are you sure? Deleted user can not be restored' => '', 'Are you sure? There is no going back' => '', 'Assignments' => '', @@ -88,18 +89,20 @@ return [ 'Deleted by GDPR request' => '', 'Description' => '', 'Didn\'t receive confirmation message?' => '', - 'Disable Two-Factor Auth' => '', + 'Disable two factor authentication' => '', 'Disconnect' => '', 'Don\'t have an account? Sign up!' => '', 'Download my data' => '', 'Email' => '', 'Email (public)' => '', 'Enable' => '', - 'Enable Two-factor auth' => '', + 'Enable two factor authentication' => '', 'Error occurred while changing password' => '', 'Error occurred while confirming user' => '', 'Error occurred while deleting user' => '', 'Export my data' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -118,6 +121,7 @@ return [ 'Invalid or expired link' => '', 'Invalid password' => '', 'Invalid two-factor code' => '', + 'Invalid two factor authentication code' => '', 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', @@ -174,6 +178,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', 'Something went wrong' => '', @@ -189,23 +194,23 @@ return [ 'This username has already been taken' => '', 'This will disable two-factor auth. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', + 'This will disable two factor authentication. Are you sure?' => '', 'Time zone' => '', 'Time zone is not valid' => '', - 'Two Factor Authentication' => '', - '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' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', 'Unable to confirm user. Please, try again.' => '', 'Unable to create an account.' => '', 'Unable to create authorization item.' => '', 'Unable to create new authorization rule.' => '', 'Unable to delete user. Please, try again later.' => '', - 'Unable to disable two-factor authorization.' => '', + 'Unable to disable Two factor authentication.' => '', 'Unable to remove authorization item.' => '', 'Unable to send confirmation link' => '', + 'Unable to send recovery message to the user' => '', 'Unable to update authorization item.' => '', 'Unable to update authorization rule.' => '', 'Unable to update block status.' => '', @@ -218,7 +223,9 @@ return [ 'Update rule' => '', 'Update user account' => '', 'Updated at' => '', + 'User account could not be created.' => '', 'User block status has been updated.' => '', + 'User could not be registered.' => '', 'User has been confirmed' => '', 'User has been created' => '', 'User has been deleted' => '', @@ -262,9 +269,19 @@ return [ 'Class "{0}" does not exist' => '@@@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', 'Registration ip' => '@@@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@@@', ]; diff --git a/src/User/resources/i18n/de/usuario.php b/src/User/resources/i18n/de/usuario.php index f801b73..6de77ad 100644 --- a/src/User/resources/i18n/de/usuario.php +++ b/src/User/resources/i18n/de/usuario.php @@ -92,13 +92,39 @@ return [ 'Class "{0}" does not exist' => '@@Klasse "{0}" existiert nicht@@', '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}' => '@@@@', + 'Disable two factor authentication' => '', + 'Enable two factor authentication' => '', + 'Invalid two factor authentication code' => '', + 'This will disable two factor authentication. Are you sure?' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', + 'Unable to disable Two factor authentication.' => '', + 'A message has been sent to your email address. ' => '@@Eine Nachricht wurde an ihre E-Mail Adresse versandt@@', + 'Awesome, almost there. ' => '@@Fast geschafft. @@', + 'Class "{0}" does not exist' => '@@Klasse "{0}" existiert nicht@@', + 'Disable Two-Factor Auth' => '@@Zweifaktor-Authentifizierung deaktivieren@@', + 'Enable Two-factor auth' => '@@Zweifaktor-Authentifizierung aktivieren@@', + 'Invalid two-factor code' => '@@Ungültiger Zweifaktor Schlüssel@@', 'Registration ip' => '@@Registrierungs-IP@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'This will disable two-factor auth. Are you sure?' => '@@Dies wird die Zweifaktor-Authentifizierung deaktivieren. Sind Sie sicher?@@', + 'Two Factor Authentication' => '@@Zweifaktor-Authentifizierung@@', + 'Two factor successfully enabled.' => '@@Zweifaktor-Authentifizierung erfolgreich aktiviert.@@', + 'Two-Factor Authentication' => '@@Zweifaktor-Authentifizierung@@', + 'Two-factor auth protects you against stolen credentials' => '@@Zweifaktor-Authentifizierung schützt Sie vor gestohlenen Zugangsdaten@@', + 'Two-factor authentication code' => '@@Zweifaktor-Authentifizierungsschlüssel@@', + 'Two-factor authorization has been disabled.' => '@@Zweifaktor-Authentifizierung wurde deaktiviert.@@', + 'Two-factor code' => '@@Zweifaktor-Schlüssel@@', + 'Unable to disable two-factor authorization.' => '@@Unfähig die Zweifaktor-Authentifizierung zu deaktivieren.@@', 'We couldn\'t re-send the mail to confirm your address. ' => '@@Wir konnte die Bestätigungs E-Mail nicht erneut versenden@@', 'We have sent confirmation links to both old and new email addresses. ' => '@@Wir haben Bestätigungs E-Mails an die neue und alte E-Mail Adresse versandt.@@', '(not set)' => '(nicht gesetzt)', 'A confirmation message has been sent to your new email address' => 'Eine Bestätigungsnachricht wurde an Ihre neue E-Mail Adresse versandt', + 'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.' => 'Eine Nachricht wurde an Ihre E-Mail-Adresse gesendet. Sie enthält einen Bestätigungslink den Sie klicken müssen um die Registrierung abzuschließen.', 'A new confirmation link has been sent' => 'Ein neuer Bestätigungs-Link wurde versendet', 'A password will be generated automatically if not provided' => 'Leer lassen, um automatisch ein Passwort zu generieren', 'Account' => 'Konto', @@ -112,22 +138,34 @@ return [ '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?', 'Are you sure you want to delete this user?' => 'Sind Sie sicher, dass Sie diesen Benutzer löschen wollen?', + 'Are you sure you want to switch to this user for the rest of this Session?' => 'Sind Sie sicher, dass Sie zu diesem Benutzer zu wechseln möchten für den Rest dieser Session?', 'Are you sure you want to unblock this user?' => 'Sind Sie sicher, dass Sie diesen Benutzer wieder freischalten wollen?', + 'Are you sure you wish to send a password recovery email to this user?' => 'Sind Sie sicher, dass Sie eine Passwortwiederherstellungs-Mail an diesen Benutzer senden möchten?', 'Are you sure? Deleted user can not be restored' => 'Sind Sie sicher? Gelöschte Benutzer können nicht wiederhergestellt werden', 'Are you sure? There is no going back' => 'Sind Sie sicher? Es gibt kein Zurück', 'Assignments' => 'Zuordnungen', 'Assignments have been updated' => 'Zuordnungen wurden gespeichert', 'Auth item with such name already exists' => 'Eine Berechtigung mit diesem Name existiert bereits', + 'Authentication rule class {0} can not be instantiated' => 'Von der Authentifizierungsregel Klasse {0} kann keine Instanz erstellt werden', 'Authorization item successfully created.' => 'Berechtigung erfolgreich erstellt', 'Authorization item successfully removed.' => 'Berechtigung erfolgreich gelöscht', 'Authorization item successfully updated.' => 'Berechtigung erfolgreich gespeichert', + 'Authorization rule has been added.' => 'Berechtigungsregel wurde hinzugefügt.', + 'Authorization rule has been removed.' => 'Berechtigungsregel wurde entfernt.', + 'Authorization rule has been updated.' => 'Berechtigungsregel wurde gespeichert.', + 'Awesome, almost there. Now you need to click the confirmation link sent to your new email address.' => 'Fast geschafft. Nun müssen Sie nur noch den Aktivierungslink besuchen, der an ihre neue E-Mail Adresse gesendet wurde.', + 'Awesome, almost there. Now you need to click the confirmation link sent to your old email address.' => 'Fast geschafft. Nun müssen Sie nur noch den Aktivierungslink besuchen, der an ihre alte E-Mail Adresse gesendet wurde.', 'Bio' => 'Bio', 'Block' => 'Blockieren', 'Block status' => 'Blockadestatus', 'Blocked at {0, date, MMMM dd, YYYY HH:mm}' => 'Blockiert am {0, date, dd. MMMM YYYY, HH:mm}', + 'Cancel' => 'Abbrechen', + 'Cannot assign role "{0}" as the AuthManager is not configured on your console application.' => 'Kann die Rolle "{0}" nicht zuordnen da der AuthManager in der Console Application nicht konfiguriert ist.', 'Change your avatar at Gravatar.com' => 'Ändern Sie ihren Avatar auf Gravatar.com', 'Children' => 'Unterelemente', - 'Complete password reset on {0}' => 'Passwort-Wiederherstellung auf {0} fertig stellen', + 'Class' => 'Klasse', + 'Close' => 'schließen', + 'Complete password reset on {0}' => 'Passwort-Wiederherstellung auf {0} fertigstellen', 'Confirm' => 'Bestätigen', 'Confirm account on {0}' => 'Konto auf {0} bestätigen', 'Confirm email change on {0}' => 'E-Mail Änderung auf {0} bestätigen', @@ -142,6 +180,8 @@ return [ 'Create a user account' => 'Konto erstellen', 'Create new permission' => 'Neue Berechtigung anlegen', 'Create new role' => 'Neue Rolle anlegen', + 'Create new rule' => 'Neue Regel erstellen', + 'Created at' => 'Erstellt am', 'Credentials will be sent to the user by email' => 'Die Zugangsdaten werden dem Nutzer per E-Mail versendet', 'Current password' => 'Aktuelles Passwort', 'Current password is not valid' => 'Das aktuelle Passwort ist nicht korrekt', @@ -153,9 +193,12 @@ return [ 'Don\'t have an account? Sign up!' => 'Sie haben noch kein Konto? Registrieren!', 'Email' => 'E-Mail', 'Email (public)' => 'E-Mail (öffentlich)', + 'Enable' => 'aktivieren', 'Error occurred while changing password' => 'Fehler beim ändern des Passworts', 'Error occurred while confirming user' => 'Fehler beim Bestätigen des Benutzers', 'Error occurred while deleting user' => 'Fehler beim Löschen des Benutzers', + 'Error sending registration message to "{email}". Please try again later.' => 'Fehler beim Senden der Registrierungsnachricht an "{email}". Bitte später noch einmal probieren.', + 'Error sending welcome message to "{email}". Please try again later.' => 'Fehler beim Senden der Willkommensnachricht an "{email}". Bitte später noch einmal probieren.', 'Finish' => 'Fertig', 'Forgot password?' => 'Passwort vergessen?', 'Gravatar email' => 'Gravatar E-Mail', @@ -163,6 +206,7 @@ return [ 'If you already registered, sign in and connect this account on settings page' => 'Wenn Sie sich bereits registriert haben, melden Sie sich an und verbinden Sie dieses Konto auf der Einstellungs-Seite', 'If you cannot click the link, please try pasting the text into your browser' => 'Wenn Sie den Link nicht anklicken können, versuchen Sie, diesen in ihre Browser-Leiste einzufügen', 'If you did not make this request you can ignore this email' => 'Wenn Sie diese Anfrage nicht gemacht haben, können Sie diese E-Mail ignorieren', + 'Impersonate this user' => 'Wechsle zu diesem Benutzer', 'In order to complete your registration, please click the link below' => 'Um Ihre Registrierung abzuschliessen, klicken Sie bitte auf den Link unten', 'In order to complete your request, please click the link below' => 'Um Ihre Anfrage abzuschliessen, klicken Sie bitte auf den Link unten', 'In order to finish your registration, we need you to enter following fields' => 'Um Ihre Registrierung abzuschliessen, müssen Sie noch die folgenden Felder ausfüllen', @@ -173,16 +217,19 @@ return [ 'It will be deleted forever' => 'Es wird permanent gelöscht', 'Items' => 'Elemente', 'Joined on {0, date}' => 'Mitglies seit {0, date}', + 'Last login' => 'Letzter Login', 'Location' => 'Ort', 'Login' => 'Anmelden', 'Logout' => 'Abmelden', 'Manage users' => 'Nutzer verwalten', 'Name' => 'Name', 'Networks' => 'Netzwerke', + 'Never' => 'Nie', 'New email' => 'Neue E-Mail', 'New password' => 'Neues Passwort', 'New permission' => 'Neue Berechtigung', 'New role' => 'Neue Rolle', + 'New rule' => 'Neue Regel', 'New user' => 'Neuer Benutzer', 'Not blocked' => 'Nicht geblockt', 'Not found' => 'Nicht gefunden', @@ -205,17 +252,30 @@ return [ 'Registration time' => 'Registrierungszeit', 'Remember me next time' => 'Anmeldung für das nächste mal merken', 'Request new confirmation message' => 'Neuen Wiederherstellungs-Link anfordern', + 'Required "key" cannot be empty.' => 'Erforderlicher "key" darf nicht leer sein.', + 'Required "secret" cannot be empty.' => 'Erforderliches "secret" darf nicht leer sein.', 'Reset your password' => 'Passwort wiederherstellen', + 'Role "{0}" not found. Creating it.' => 'Rolle "{0}" nicht gefunden. Erstelle diese.', 'Roles' => 'Rollen', 'Rule' => 'Regel', + 'Rule class must extend "yii\\rbac\\Rule".' => 'Regelklasse muss "yii\\rbac\\Rule" erweitern.', 'Rule name' => 'Regelname', + 'Rule name {0} is already in use' => 'Regelname {0} bereits in Benutzung', + 'Rule {0} does not exists' => 'Regel {0} existiert nicht', + 'Rule {0} not found.' => 'Regel {0} nicht gefunden.', + 'Rules' => 'Regeln', 'Save' => 'Speichern', + 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => 'Scanne den Qr-Code mit der Google Authenticator App, dann füge den temporären Schlüssel in das Feld und sende es ab.', + 'Send password recovery email' => 'Sende Mail zur Passwortwiederherstellung', 'Sign in' => 'Anmelden', 'Sign up' => 'Registrieren', 'Something went wrong' => 'Etwas ist schiefgelaufen', + 'Switch identities is disabled.' => 'Identitäten wechseln ist deaktiviert.', 'Thank you for signing up on {0}' => 'Danke für ihre Registrierung auf {0}', 'Thank you, registration is now complete.' => 'Danke, ihre Registrierung ist nun abgeschlossen.', + 'The "recaptcha" component must be configured.' => 'Die "recaptcha" Komponente muss konfiguriert werden.', 'The confirmation link is invalid or expired. Please try requesting a new one.' => 'Ihr Aktivierungslink ist falsch oder abgelaufen. Bitte fordern Sie einen neuen an.', + 'The verification code is incorrect.' => 'Der Verifizierungsschlüssel ist ungültig.', 'There is neither role nor permission with name "{0}"' => 'Es gibt weder eine Rolle noch eine Berechtigung mit dem Namen "{0}"', 'This account has already been connected to another user' => 'Dieses Konto wurde bereits von einem anderen Benutzer verbunden', 'This email address has already been taken' => 'Die E-Mail Adresse ist bereits vergeben', @@ -225,10 +285,13 @@ return [ 'Unable to confirm user. Please, try again.' => 'Der Benutzer konnte nicht bestätigt werden. Bitte versuchen Sie es erneut.', 'Unable to create an account.' => 'Konto konnte nicht erstellt werden', 'Unable to create authorization item.' => 'Authorization Item konnte nicht erstellt werden', + 'Unable to create new authorization rule.' => 'Unfähig eine neue Authentifizierungsregel zu erstellen.', 'Unable to delete user. Please, try again later.' => 'Benutzer konnte nicht gelöscht werden.', 'Unable to remove authorization item.' => 'Authorization Item konnte nicht gelöscht werden.', 'Unable to send confirmation link' => 'Konnte Bestätigungslink nicht versenden', + 'Unable to send recovery message to the user' => 'Unfähig die Wiederherstellungsnachricht an den Benutzer zu senden.', 'Unable to update authorization item.' => 'Konnte Authorization item nicht ändern', + 'Unable to update authorization rule.' => 'Unfähig die Berechtigungsregel zu speichern.', 'Unable to update block status.' => 'Konnte den Block-Status nicht ändern', 'Unblock' => 'Freischalten', 'Unconfirmed' => 'Unbestätigt', @@ -236,18 +299,26 @@ return [ 'Update assignments' => 'Zuweisung ändern', 'Update permission' => 'Berechtigung ändern', 'Update role' => 'Rolle ändern', + 'Update rule' => 'Regel aktualisieren', 'Update user account' => 'Konto ändern', + 'Updated at' => 'Aktualisiert am', + 'User account could not be created.' => 'Benutzerkonto konnte nicht erstellt werden.', 'User block status has been updated.' => 'Der Status des Benutzer wurde gespeichert', + 'User could not be registered.' => 'Benutzer konnte nicht registriert werden.', 'User has been confirmed' => 'Benutzer wurde bestätigt', 'User has been created' => 'Benutzer wurde angelegt', 'User has been deleted' => 'Benutzer wurde gelöscht', 'User is not found' => 'Benutzer wurde nicht gefunden', + 'User not found.' => 'Benutzer nicht gefunden.', 'Username' => 'Benutzername', 'Users' => 'Benutzer', 'VKontakte' => 'VKontakte', + 'Verification failed. Please, enter new code.' => 'Verifizierung fehlgeschlagen. Bitte einen neuen Schlüssel eingeben.', + 'We couldn\'t re-send the mail to confirm your address. Please, verify is the correct email or if it has been confirmed already.' => 'Wir konnten die Mail zur Bestätigung Ihrer Adresse nicht noch einmal senden. Bitte kontrollieren Sie ob die E-Mail-Adresse korrekt ist oder diese bereits bestätigt wurde.', 'We have generated a password for you' => 'Ein Passwort wurde für Sie generiert', 'We have received a request to change the email address for your account on {0}' => 'Wir haben eine Anfrage, ihre E-Mail Adresse auf {0} zu verändern, bekommen', 'We have received a request to reset the password for your account on {0}' => 'Wir haben eine Anfrage, ihr Passwort auf {0} wiederherzustellen, bekommen', + 'We have sent confirmation links to both old and new email addresses. You must click both links to complete your request.' => 'Wir haben Ihnen Bestätigungslinks an die alte und neue E-Mail-Adresse geschickt. Sie müssen beide Links anklicken um die Anfrage fertigzustellen.', 'Website' => 'Webseite', 'Welcome to {0}' => 'Willkommen auf {0}', 'Yandex' => 'Yandex', @@ -267,4 +338,5 @@ return [ 'Your email address has been changed' => 'Ihre E-Mail Adresse wurde geändert', 'Your profile has been updated' => 'Ihr Profil wurde gespeichert', '{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/es/usuario.php b/src/User/resources/i18n/es/usuario.php index eceb972..a47bd6a 100644 --- a/src/User/resources/i18n/es/usuario.php +++ b/src/User/resources/i18n/es/usuario.php @@ -27,6 +27,28 @@ return [ 'Your consent is required to register' => 'El consentimiento es necesario para poder registrarse', 'Your personal information has been removed' => 'Su información personal ha sido eliminada', 'privacy policy' => 'política de privacidad', + 'Disable two factor authentication' => 'Desactivar la autenticación en dos pasos', + 'Enable two factor authentication' => 'Activar la autenticación en dos pasos', + 'Invalid two factor authentication code' => 'Invalidar el código de autenticación en dos pasos', + 'This will disable two factor authentication. Are you sure?' => 'Esto desactivará la autenticación en dos pasos.¿Está seguro?', + 'Two Factor Authentication (2FA)' => 'Autenticación en dos pasos (2FA)', + 'Two factor authentication code' => 'Código de autenticación en dos pasos', + 'Two factor authentication has been disabled.' => 'La autenticación en dos pasos ha sido desactivada.', + 'Two factor authentication protects you against stolen credentials' => 'La autenticación en dos pasos le ayuda a protegerse ante el robo de credenciales', + 'Two factor authentication successfully enabled.' => 'Activado correctamente', + 'Unable to disable Two factor authentication.' => 'Imposible desactivar la autenticación en dos pasos.', + 'Disable Two-Factor Auth' => '@@Desabilitar autenticación de dos factores@@', + 'Enable Two-factor auth' => '@@Habilitar autenticación de dos factores@@', + 'Invalid two-factor code' => '@@Código de dos factores inválido@@', + 'This will disable two-factor auth. Are you sure?' => '@@Esto inhabilitará la autenticación de dos factores. Estás seguro?@@', + 'Two Factor Authentication' => '@@Autenticación de Dos Factores@@', + 'Two factor successfully enabled.' => '@@Autenticación de dos factores habilitada con éxito.@@', + 'Two-Factor Authentication' => '@@Autenticación de Dos Factores@@', + 'Two-factor auth protects you against stolen credentials' => '@@La autenticación te protege contra el robo de credenciales@@', + 'Two-factor authentication code' => '@@Código de doble autenticación@@', + 'Two-factor authorization has been disabled.' => '@@La autenticación de dos factores ha sido inhabilitada.@@', + 'Two-factor code' => '@@Código de dos factores@@', + 'Unable to disable two-factor authorization.' => '@@Ha sido imposible inhabilitar al autenticación de dos factores.@@', '(not set)' => '(sin establecer)', 'A confirmation message has been sent to your new email address' => 'Se ha enviado un mensaje de confirmación a tu nueva dirección de correo electrónico', 'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.' => 'Un mensaje ha sido enviado a tu dirección de correo electrónico. Contiene un vínculo de confirmación que tienes que seguir para completar el registro.', @@ -45,6 +67,7 @@ return [ 'Are you sure you want to delete this user?' => '¿Estas seguro de querer eliminar este usuario?', 'Are you sure you want to switch to this user for the rest of this Session?' => 'Estás seguro que quieres intercambiarte por este usuario para el resto de esta sesión?', 'Are you sure you want to unblock this user?' => '¿Estas seguro de querer desbloquear este usuario?', + 'Are you sure you wish to send a password recovery email to this user?' => 'Estás seguro de querer enviar un email de recuperación de contraseña a este usuario?', 'Are you sure? Deleted user can not be restored' => '¿Estas seguro? Los usuarios eliminados no se pueden restaurar', 'Are you sure? There is no going back' => '¿Estás seguro? No se podrá volver atrás', 'Assignments' => 'Asignaciones', @@ -98,18 +121,18 @@ return [ 'Deleted by GDPR request' => 'Borrado por solicitud GDPR', 'Description' => 'Descripción', 'Didn\'t receive confirmation message?' => '¿No has recibido el mensaje de confirmación?', - 'Disable Two-Factor Auth' => 'Desabilitar autenticación de dos factores', 'Disconnect' => 'Desconectar', 'Don\'t have an account? Sign up!' => '¿No tienes cuenta? ¡Regístrate!', 'Download my data' => 'Descargar mis datos', 'Email' => 'Correo electrónico', 'Email (public)' => 'Correo electrónico (público)', 'Enable' => 'Habilitar', - 'Enable Two-factor auth' => 'Habilitar autenticación de dos factores', 'Error occurred while changing password' => 'Se ha producido un error al cambiar la contraseña', 'Error occurred while confirming user' => 'Se ha producido un error al confirmar el usuario', 'Error occurred while deleting user' => 'Se ha producido un error al eliminar el usuario', 'Export my data' => 'Exportar mis datos', + 'Error sending registration message to "{email}". Please try again later.' => 'Ha ocurrido un error enviando el mensaje de registro a "{email}". Por favor inténtalo de nuevo más tarde.', + 'Error sending welcome message to "{email}". Please try again later.' => 'Ha ocurrido un error al enviar el mensaje de bienvenida a "{email}". Por favor inténtalo de nuevo más tarde.', 'Finish' => 'Finalizar', 'Forgot password?' => '¿Olvidaste la contraseña?', 'Gravatar email' => 'Correo electrónico Gravatar', @@ -118,6 +141,9 @@ return [ 'If you already registered, sign in and connect this account on settings page' => 'Si ya está registrados, inicie sesión y conecta esta cuenta en la página de configuración', 'If you cannot click the link, please try pasting the text into your browser' => 'Si tienes problemas, por favor, pegua la siguiente dirección URL en su navegador web', 'If you did not make this request you can ignore this email' => 'PD: Si ha recibido este correo electrónico por error, simplemente elimínelo', + 'If you already registered, sign in and connect this account on settings page' => 'Si ya estas registrado, inicia sesión y conecta esta cuenta en la página de configuración', + 'If you cannot click the link, please try pasting the text into your browser' => 'Si tienes problemas, por favor, pega la siguiente dirección URL en tu navegador web', + 'If you did not make this request you can ignore this email' => 'PD: Si has recibido este correo electrónico por error, simplemente elimínalo', 'Impersonate this user' => 'Personificar este usuario', 'In order to complete your registration, please click the link below' => 'Para completar el registro, por favor haz clic en el siguiente enlance', 'In order to complete your request, please click the link below' => 'Para completar tu petición, haz clic en el siguiente enlace', @@ -125,7 +151,6 @@ return [ 'Information' => 'Información', 'Invalid login or password' => 'Usuario o contraseña incorrectos', 'Invalid or expired link' => 'Enlace inválido o caducado', - 'Invalid two-factor code' => 'Código de dos factores inválido', 'Invalid value' => 'Valor inválido', 'It will be deleted forever' => 'Será eliminado para siempre', 'Items' => 'Elementos', @@ -179,6 +204,7 @@ return [ 'Rules' => 'Reglas', 'Save' => 'Guardar', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => 'Escanee el QrCode con la aplicación Google Authenticator, luego inserte su código temporal en el campo de texto y envíe.', + 'Send password recovery email' => 'Enviar email de recuperación de contraseña', 'Sign in' => 'Iniciar sesión', 'Sign up' => 'Registrarse', 'Something went wrong' => 'Algo salió mal', @@ -192,24 +218,16 @@ return [ 'This account has already been connected to another user' => 'Esta cuenta ya está conectada con otro usuario', 'This email address has already been taken' => 'Esta cuenta de correo electrónico ya está siendo utilizada', 'This username has already been taken' => 'El nombre de usuario ya está siendo utlizado', - 'This will disable two-factor auth. Are you sure?' => 'Esto inhabilitará la autenticación de dos factores. Estás seguro?', 'Time zone' => 'Zona horaria', 'Time zone is not valid' => 'La zona horaria no es válida', - 'Two Factor Authentication' => 'Autenticación de Dos Factores', - 'Two factor successfully enabled.' => 'Autenticación de dos factores habilitada con éxito.', - 'Two-Factor Authentication' => 'Autenticación de Dos Factores', - 'Two-factor auth protects you against stolen credentials' => 'La autenticación te protege contra el robo de credenciales', - 'Two-factor authentication code' => 'Código de doble autenticación', - 'Two-factor authorization has been disabled.' => 'La autenticación de dos factores ha sido inhabilitada.', - 'Two-factor code' => 'Código de dos factores', 'Unable to confirm user. Please, try again.' => 'No se ha podido confirmar el usuario. Por favor, inténtalo de nuevo.', 'Unable to create an account.' => 'No se ha podido crear la cuenta.', 'Unable to create authorization item.' => 'No se puede actualizar el elemento de autorización.', 'Unable to create new authorization rule.' => 'Ha sido imposible crear la nueva regla de autenticación.', 'Unable to delete user. Please, try again later.' => 'No se ha podido eliminar el usuario. Por favor, inténtalo más tarde.', - 'Unable to disable two-factor authorization.' => 'Ha sido imposible inhabilitar al autenticación de dos factores.', 'Unable to remove authorization item.' => 'No se ha podido eliminar el elemento de autorización.', 'Unable to send confirmation link' => 'No se ha podido enviar el enlace de confirmación', + 'Unable to send recovery message to the user' => 'Ha sido imposible enviar el email de recuperación de contraseña', 'Unable to update authorization item.' => 'No se ha podido actualizar el elemento de autorización.', 'Unable to update authorization rule.' => 'Ha sido imposible actualizar la regla de autencicación.', 'Unable to update block status.' => 'No se ha podido actualizar el estado de bloqueo.', @@ -222,7 +240,9 @@ return [ 'Update rule' => 'Actualiza regla', 'Update user account' => 'Actualizar cuenta', 'Updated at' => 'Actualizado el', + 'User account could not be created.' => 'La cuenta de usuario no ha podido ser creada.', 'User block status has been updated.' => 'El estado de bloqueo del usuario ha sido actualizado.', + 'User could not be registered.' => 'El usuario no ha podido ser registrado.', 'User has been confirmed' => 'El usuario ha sido confirmado', 'User has been created' => 'El usuario ha sido creado', 'User has been deleted' => 'El usuario ha sido eliminado', diff --git a/src/User/resources/i18n/et/usuario.php b/src/User/resources/i18n/et/usuario.php new file mode 100644 index 0000000..c42091c --- /dev/null +++ b/src/User/resources/i18n/et/usuario.php @@ -0,0 +1,218 @@ + '(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. ' => 'Saatsime sulle kinnituseks e-kirja. ', + 'A new confirmation link has been sent' => 'Uus kinnituslink on saadetud', + 'A password will be generated automatically if not provided' => 'Parool genereeritakse automaatselt, kui ei ole seatud', + 'Account' => 'Konto', + 'Account confirmation' => 'Konto kinnitamine', + 'Account details' => 'Konto andmed', + '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?', + 'Are you sure you want to delete this user?' => 'Oled kindel, et tahad selle kasutaja kustutada?', + 'Are you sure you want to switch to this user for the rest of this Session?' => 'Oled sa kindel, et soovid ülejäänud sessiooni ajaks lülituda ümber sellele kasutajale?', + 'Are you sure you want to unblock this user?' => 'Oled kindel, et tahad selle kasutaja blokeerimise tühistada?', + 'Are you sure? Deleted user can not be restored' => 'Oled sa kindel? Kustutatud kasutajat ei saa enam taastada', + 'Are you sure? There is no going back' => 'Oled sa kindel? Siit tagasiteed ei ole', + 'Assignments' => 'Omistamised', + 'Assignments have been updated' => 'Omistamised uuendati', + 'Auth item with such name already exists' => 'Sellise nimega õigus on juba olemas', + 'Authentication rule class {0} can not be instantiated' => '', + 'Authorization item successfully created.' => '', + 'Authorization item successfully removed.' => '', + 'Authorization item successfully updated.' => '', + 'Authorization rule has been added.' => '', + 'Authorization rule has been removed.' => '', + 'Authorization rule has been updated.' => '', + 'Awesome, almost there. ' => 'Kena, peaaegu valmis.', + 'Bio' => 'Bio', + 'Block' => 'Blokeeri', + 'Block status' => 'Blokeerimise staatus', + 'Blocked at {0, date, MMMM dd, YYYY HH:mm}' => 'Blokeeritud: {0, date, MMMM dd, YYYY HH:mm}', + 'Change your avatar at Gravatar.com' => 'Muuda oma avatari Gravatar.com-is', + 'Children' => 'All-osad', + 'Class' => 'Klass', + 'Complete password reset on {0}' => 'Lõpeta {0} parooli uuendamine', + 'Confirm' => 'Kinnita', + 'Confirm account on {0}' => 'Kinnita {0} konto', + 'Confirm email change on {0}' => 'Kinnita {0} konto e-maili muutus', + 'Confirmation' => 'Kinnitus', + 'Confirmation status' => 'Kinnituse staatus', + 'Confirmation time' => 'Kinnitamise aeg', + 'Confirmed' => 'Kinnitatud', + 'Confirmed at {0, date, MMMM dd, YYYY HH:mm}' => 'Kinnitatud: {0, date, MMMM dd, YYYY HH:mm}', + 'Connect' => 'Ühenda', + 'Continue' => 'Edasi', + 'Create' => 'Uus', + 'Create a user account' => 'Loo kasutajakonto', + 'Create new permission' => 'Loo uus õigus', + 'Create new role' => 'Loo uus roll', + 'Create new rule' => 'Loo uus reegel', + 'Created at' => '', + 'Credentials will be sent to the user by email' => 'Konto andmed saadetakse kasutajale e-mailiga', + 'Current password' => 'Praegune parool', + 'Current password is not valid' => 'Praegune parool ei ole õige', + 'Delete' => 'Kustuta', + 'Delete account' => 'Kustuta konto', + 'Description' => 'Kirjeldus', + 'Didn\'t receive confirmation message?' => 'Ei ole saanud kinnituskirja?', + 'Disconnect' => 'Ühenda lahti', + 'Don\'t have an account? Sign up!' => 'Ei ole veel kontot? Liitu!', + 'Email' => 'Emaili aadress', + 'Email (public)' => 'Emaili aadress (avalik)', + 'Error occurred while changing password' => 'Viga parooli vahetamisel.', + 'Error occurred while confirming user' => 'Viga kasutaja kinnitamisel', + 'Error occurred while deleting user' => 'Viga kasutaja kustutamisel', + 'Finish' => 'Lõpeta', + 'Forgot password?' => 'Unustasid parooli?', + 'Gravatar email' => 'Gravatari e-posti aadress', + 'Hello' => 'Tere', + 'If you already registered, sign in and connect this account on settings page' => 'Kui oled juba registreerunud, logi sisse ja ühenda see konto oma seadete lehel', + 'If you cannot click the link, please try pasting the text into your browser' => 'Kui sa ei saa lingil klikkida, proovi see kleepida oma brausri aadressireale', + 'If you did not make this request you can ignore this email' => 'Kui sa ei ole seda päringut tellinud, siis võid seda kirja ignoreerida', + 'Impersonate this user' => 'Kehastu selleks kasutajaks', + 'In order to complete your registration, please click the link below' => 'Kliki alloleval lingil, et registreerimine kinnitada', + 'In order to complete your request, please click the link below' => 'Kliki alloleval lingil, et oma päring kinnitada', + 'In order to finish your registration, we need you to enter following fields' => 'Pead täitma järgnevad väljad, et registreerimine lõpule viia', + 'Information' => 'Informatsioon', + 'Invalid login or password' => 'Vale kasutajanimi või parool', + 'Invalid or expired link' => 'Vale või aegunud link', + 'Invalid value' => 'Ebasobiv väärtus', + 'It will be deleted forever' => 'See kustutatakse alatiseks', + 'Items' => 'Õigused', + 'Joined on {0, date}' => 'Liitunud: {0, date}', + 'Location' => 'Asukoht', + 'Login' => 'Sisene', + 'Logout' => 'Logi välja', + 'Manage users' => 'Halda kasutajaid', + 'Name' => 'Nimi', + 'Networks' => 'Võrgustikud', + 'New email' => 'Uus e-kiri', + 'New password' => 'Uus parool', + 'New permission' => 'Uus õigus', + 'New role' => 'Uus roll', + 'New rule' => 'Uus reegel', + 'New user' => 'Uus kasutaja', + 'Not blocked' => 'Ei ole blokitud', + 'Not found' => 'Ei leitud', + 'Once you delete your account, there is no going back' => 'Kui oma konto kustutad, ei ole enam tagasiteed', + 'Password' => 'Parool', + 'Password has been changed' => 'Parool on muudetud', + 'Permissions' => 'Õigused', + 'Please be certain' => 'Palun ole kindel', + 'Please click the link below to complete your password reset' => 'Palun kliki alloleval lingil, et oma parooli uuendada', + 'Please fix following errors:' => 'Palun paranda järgnevad vead:', + 'Profile' => 'Profiil', + 'Profile details' => 'Profiili andmed', + 'Profile details have been updated' => 'Profiili andmed on uuendatud', + 'Profile settings' => 'Profiili seaded', + 'Recover your password' => 'Taasta oma parool', + 'Recovery link is invalid or expired. Please try requesting a new one.' => 'Taastamislink on vale või aegunud. Palun proovi tellida uus.', + 'Recovery message sent' => 'Taastamiskiri on saadetud', + 'Registration IP' => 'Registreerimise IP', + 'Registration on this website is disabled' => 'Sel lehel ei ole registreerumine lubatud', + 'Registration time' => 'Registreerimise aeg', + 'Remember me next time' => 'Jäta mind meelde', + 'Request new confirmation message' => 'Telli uus kinnituskiri', + 'Reset your password' => 'Lähtesta parool', + 'Roles' => 'Rollid', + 'Rule' => 'Reegel', + 'Rule class must extend "yii\\rbac\\Rule".' => '', + 'Rule name' => 'Reegli nimi', + 'Rule name {0} is already in use' => 'Reegel nimega {0} on juba kasutusel', + 'Rule {0} does not exist' => 'Reeglit nimega {0} ei ole olemas', + 'Rule {0} not found.' => 'Reeglit {0} ei leitud', + 'Rules' => 'Reeglid', + 'Save' => 'Salvesta', + 'Sign in' => 'Logi sisse', + 'Sign up' => 'Liitu', + 'Something went wrong' => 'Midagi läks valesti', + 'Switch identities is disabled.' => 'Identiteedi vahetamine on keelatud', + 'Thank you for signing up on {0}' => 'Aitäh, et liitusid lehega {0}', + 'Thank you, registration is now complete.' => 'Aitäh, oled nüüd registreeritud', + 'The confirmation link is invalid or expired. Please try requesting a new one.' => 'Kinnituslink on vale või aegunud. Palun proovi tellida uus.', + 'There is neither role nor permission with name "{0}"' => 'Ei ole rolli ega õigust nimega "{0}"', + 'This account has already been connected to another user' => 'See konto on juba kinnitatud teise kasutaja poolt', + 'This email address has already been taken' => 'See e-maili aadress on juba võetud', + 'This username has already been taken' => 'See kasutajanimi on juba võetud', + 'Time zone' => 'Ajavöönd', + 'Time zone is not valid' => 'Ajavöönd ei ole kotrrektne', + 'Unable to confirm user. Please, try again.' => 'Kasutaja kinnitamine ebaõnnestus. Palun proovi uuesti.', + 'Unable to create an account.' => 'Konto loomine ebaõnnestus.', + 'Unable to create authorization item.' => 'Õiguse loomine ebaõnnestus.', + 'Unable to create new authorization rule.' => 'Reegli loomine ebaõnnestus.', + 'Unable to delete user. Please, try again later.' => 'kasutaja kustutamine ebaõnnestus. Palun proovi hiljem uuesti.', + 'Unable to remove authorization item.' => 'Õiguse eemaldamine ebaõnnestus.', + 'Unable to send confirmation link' => 'Kinnituse lingi saatmine ebaõnnestus.', + 'Unable to update authorization item.' => 'Õiguse muutmine ebaõnnestus.', + 'Unable to update authorization rule.' => 'Reegli muutmine ebaõnnestus', + 'Unable to update block status.' => 'Blokkimise staatuse muutmine ebaõnnestus.', + 'Unblock' => 'Eemalda blokk', + 'Unconfirmed' => 'Kinnitamata', + 'Update' => 'Muuda', + 'Update assignments' => 'Muuda omistamisi', + 'Update permission' => 'Muud õigus', + 'Update role' => 'Muuda rolli', + 'Update rule' => 'Muuda reeglit', + 'Update user account' => 'Muuda kasutajakontot', + 'Updated at' => 'Muudetud:', + 'User block status has been updated.' => 'Kasutaja blokeering on muudetud.', + 'User has been confirmed' => 'Kasutaja on kinnitatud', + 'User has been created' => 'Kasutaja on loodud', + 'User has been deleted' => 'Kasutaja on kustutatud', + 'User is not found' => 'Kasutajat ei leitud', + 'Username' => 'Kasutajanimi', + 'Users' => 'Kasutajad', + 'VKontakte' => '', + 'We couldn\'t re-send the mail to confirm your address. ' => 'Me ei suutnud sinu e-posti kinnitamiseks kirja uuseti saata.', + 'We have generated a password for you' => 'Genereerisime sulle parooli', + 'We have received a request to change the email address for your account on {0}' => 'Oleme saanud tellimuse sinu {0} konto e-maili muutmiseks', + 'We have received a request to reset the password for your account on {0}' => 'Oleme saanud palve sinu {0} konto parooli resettimiseks', + 'We have sent confirmation links to both old and new email addresses. ' => 'Saatsime kinnituslingid nii sinu vanale kui uuele e-maili aadressile.', + 'Website' => 'Koduleht', + 'Welcome to {0}' => 'Teretulemast lehele {0}', + 'Yandex' => '', + 'You can assign multiple roles or permissions to user by using the form below' => 'Alloleva vormi abil võid kasutajale omistada mitmeid rolle ning õigusi', + 'You can connect multiple accounts to be able to log in using them' => 'Võid ühendada mitu sotsiaalmeedia kontot, mida saad kasutada kontole sisse logimiseks', + 'You cannot remove your own account' => 'Sa ei saa kustutada iseenda kontot', + 'You need to confirm your email address' => 'Sa pead oma e-posti aadressi kinnitama', + 'Your account details have been updated' => 'Sinu konto andmed on uuendatud', + 'Your account has been blocked' => 'Sinu konto on blokeeritud', + 'Your account has been blocked.' => 'Sinu konto on blokeeritud.', + 'Your account has been completely deleted' => 'Sinu konto on täielukult kustutatud', + 'Your account has been connected' => 'Sinu konto on ühendatud', + 'Your account has been created' => 'Sinu konto on loodud', + 'Your account has been created and a message with further instructions has been sent to your email' => 'Sinu konto on loodud ning edasised instruktsioonid on saadetud sinu e-mailile', + 'Your account on {0} has been created' => 'Sinu {0} konto on loodud', + 'Your confirmation token is invalid or expired' => 'Kinnituse kood on vale või aegunud', + 'Your email address has been changed' => 'Sinu e-mail on muudetud', + 'Your profile has been updated' => 'Sinu profiil on uuendatud', + '{0, date, MMMM dd, YYYY HH:mm}' => '', + 'Class "{0}" does not exist' => '@@@@', + 'Registration ip' => '@@@@', + 'Rule class can not be instantiated' => '@@@@', + 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', +]; diff --git a/src/User/resources/i18n/fa-IR/usuario.php b/src/User/resources/i18n/fa-IR/usuario.php index 5b39d05..89759e9 100644 --- a/src/User/resources/i18n/fa-IR/usuario.php +++ b/src/User/resources/i18n/fa-IR/usuario.php @@ -35,6 +35,7 @@ return [ 'Are you sure you want to delete this user?' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you want to unblock this user?' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', 'Are you sure? Deleted user can not be restored' => '', 'Are you sure? There is no going back' => '', 'Assignments' => '', @@ -88,18 +89,20 @@ return [ 'Deleted by GDPR request' => '', 'Description' => '', 'Didn\'t receive confirmation message?' => '', - 'Disable Two-Factor Auth' => '', + 'Disable two factor authentication' => '', 'Disconnect' => '', 'Don\'t have an account? Sign up!' => '', 'Download my data' => '', 'Email' => '', 'Email (public)' => '', 'Enable' => '', - 'Enable Two-factor auth' => '', + 'Enable two factor authentication' => '', 'Error occurred while changing password' => '', 'Error occurred while confirming user' => '', 'Error occurred while deleting user' => '', 'Export my data' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -118,6 +121,7 @@ return [ 'Invalid or expired link' => '', 'Invalid password' => '', 'Invalid two-factor code' => '', + 'Invalid two factor authentication code' => '', 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', @@ -174,6 +178,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', 'Something went wrong' => '', @@ -189,23 +194,23 @@ return [ 'This username has already been taken' => '', 'This will disable two-factor auth. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', + 'This will disable two factor authentication. Are you sure?' => '', 'Time zone' => '', 'Time zone is not valid' => '', - 'Two Factor Authentication' => '', - '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' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', 'Unable to confirm user. Please, try again.' => '', 'Unable to create an account.' => '', 'Unable to create authorization item.' => '', 'Unable to create new authorization rule.' => '', 'Unable to delete user. Please, try again later.' => '', - 'Unable to disable two-factor authorization.' => '', + 'Unable to disable Two factor authentication.' => '', 'Unable to remove authorization item.' => '', 'Unable to send confirmation link' => '', + 'Unable to send recovery message to the user' => '', 'Unable to update authorization item.' => '', 'Unable to update authorization rule.' => '', 'Unable to update block status.' => '', @@ -218,7 +223,9 @@ return [ 'Update rule' => '', 'Update user account' => '', 'Updated at' => '', + 'User account could not be created.' => '', 'User block status has been updated.' => '', + 'User could not be registered.' => '', 'User has been confirmed' => '', 'User has been created' => '', 'User has been deleted' => '', @@ -262,9 +269,19 @@ return [ 'Class "{0}" does not exist' => '@@@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', 'Registration ip' => '@@@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@@@', ]; diff --git a/src/User/resources/i18n/fi/usuario.php b/src/User/resources/i18n/fi/usuario.php index 5b39d05..89759e9 100644 --- a/src/User/resources/i18n/fi/usuario.php +++ b/src/User/resources/i18n/fi/usuario.php @@ -35,6 +35,7 @@ return [ 'Are you sure you want to delete this user?' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you want to unblock this user?' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', 'Are you sure? Deleted user can not be restored' => '', 'Are you sure? There is no going back' => '', 'Assignments' => '', @@ -88,18 +89,20 @@ return [ 'Deleted by GDPR request' => '', 'Description' => '', 'Didn\'t receive confirmation message?' => '', - 'Disable Two-Factor Auth' => '', + 'Disable two factor authentication' => '', 'Disconnect' => '', 'Don\'t have an account? Sign up!' => '', 'Download my data' => '', 'Email' => '', 'Email (public)' => '', 'Enable' => '', - 'Enable Two-factor auth' => '', + 'Enable two factor authentication' => '', 'Error occurred while changing password' => '', 'Error occurred while confirming user' => '', 'Error occurred while deleting user' => '', 'Export my data' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -118,6 +121,7 @@ return [ 'Invalid or expired link' => '', 'Invalid password' => '', 'Invalid two-factor code' => '', + 'Invalid two factor authentication code' => '', 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', @@ -174,6 +178,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', 'Something went wrong' => '', @@ -189,23 +194,23 @@ return [ 'This username has already been taken' => '', 'This will disable two-factor auth. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', + 'This will disable two factor authentication. Are you sure?' => '', 'Time zone' => '', 'Time zone is not valid' => '', - 'Two Factor Authentication' => '', - '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' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', 'Unable to confirm user. Please, try again.' => '', 'Unable to create an account.' => '', 'Unable to create authorization item.' => '', 'Unable to create new authorization rule.' => '', 'Unable to delete user. Please, try again later.' => '', - 'Unable to disable two-factor authorization.' => '', + 'Unable to disable Two factor authentication.' => '', 'Unable to remove authorization item.' => '', 'Unable to send confirmation link' => '', + 'Unable to send recovery message to the user' => '', 'Unable to update authorization item.' => '', 'Unable to update authorization rule.' => '', 'Unable to update block status.' => '', @@ -218,7 +223,9 @@ return [ 'Update rule' => '', 'Update user account' => '', 'Updated at' => '', + 'User account could not be created.' => '', 'User block status has been updated.' => '', + 'User could not be registered.' => '', 'User has been confirmed' => '', 'User has been created' => '', 'User has been deleted' => '', @@ -262,9 +269,19 @@ return [ 'Class "{0}" does not exist' => '@@@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', 'Registration ip' => '@@@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@@@', ]; diff --git a/src/User/resources/i18n/fr/usuario.php b/src/User/resources/i18n/fr/usuario.php index 5b39d05..89759e9 100644 --- a/src/User/resources/i18n/fr/usuario.php +++ b/src/User/resources/i18n/fr/usuario.php @@ -35,6 +35,7 @@ return [ 'Are you sure you want to delete this user?' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you want to unblock this user?' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', 'Are you sure? Deleted user can not be restored' => '', 'Are you sure? There is no going back' => '', 'Assignments' => '', @@ -88,18 +89,20 @@ return [ 'Deleted by GDPR request' => '', 'Description' => '', 'Didn\'t receive confirmation message?' => '', - 'Disable Two-Factor Auth' => '', + 'Disable two factor authentication' => '', 'Disconnect' => '', 'Don\'t have an account? Sign up!' => '', 'Download my data' => '', 'Email' => '', 'Email (public)' => '', 'Enable' => '', - 'Enable Two-factor auth' => '', + 'Enable two factor authentication' => '', 'Error occurred while changing password' => '', 'Error occurred while confirming user' => '', 'Error occurred while deleting user' => '', 'Export my data' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -118,6 +121,7 @@ return [ 'Invalid or expired link' => '', 'Invalid password' => '', 'Invalid two-factor code' => '', + 'Invalid two factor authentication code' => '', 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', @@ -174,6 +178,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', 'Something went wrong' => '', @@ -189,23 +194,23 @@ return [ 'This username has already been taken' => '', 'This will disable two-factor auth. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', + 'This will disable two factor authentication. Are you sure?' => '', 'Time zone' => '', 'Time zone is not valid' => '', - 'Two Factor Authentication' => '', - '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' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', 'Unable to confirm user. Please, try again.' => '', 'Unable to create an account.' => '', 'Unable to create authorization item.' => '', 'Unable to create new authorization rule.' => '', 'Unable to delete user. Please, try again later.' => '', - 'Unable to disable two-factor authorization.' => '', + 'Unable to disable Two factor authentication.' => '', 'Unable to remove authorization item.' => '', 'Unable to send confirmation link' => '', + 'Unable to send recovery message to the user' => '', 'Unable to update authorization item.' => '', 'Unable to update authorization rule.' => '', 'Unable to update block status.' => '', @@ -218,7 +223,9 @@ return [ 'Update rule' => '', 'Update user account' => '', 'Updated at' => '', + 'User account could not be created.' => '', 'User block status has been updated.' => '', + 'User could not be registered.' => '', 'User has been confirmed' => '', 'User has been created' => '', 'User has been deleted' => '', @@ -262,9 +269,19 @@ return [ 'Class "{0}" does not exist' => '@@@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', 'Registration ip' => '@@@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@@@', ]; diff --git a/src/User/resources/i18n/hr/usuario.php b/src/User/resources/i18n/hr/usuario.php index 5b39d05..89759e9 100644 --- a/src/User/resources/i18n/hr/usuario.php +++ b/src/User/resources/i18n/hr/usuario.php @@ -35,6 +35,7 @@ return [ 'Are you sure you want to delete this user?' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you want to unblock this user?' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', 'Are you sure? Deleted user can not be restored' => '', 'Are you sure? There is no going back' => '', 'Assignments' => '', @@ -88,18 +89,20 @@ return [ 'Deleted by GDPR request' => '', 'Description' => '', 'Didn\'t receive confirmation message?' => '', - 'Disable Two-Factor Auth' => '', + 'Disable two factor authentication' => '', 'Disconnect' => '', 'Don\'t have an account? Sign up!' => '', 'Download my data' => '', 'Email' => '', 'Email (public)' => '', 'Enable' => '', - 'Enable Two-factor auth' => '', + 'Enable two factor authentication' => '', 'Error occurred while changing password' => '', 'Error occurred while confirming user' => '', 'Error occurred while deleting user' => '', 'Export my data' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -118,6 +121,7 @@ return [ 'Invalid or expired link' => '', 'Invalid password' => '', 'Invalid two-factor code' => '', + 'Invalid two factor authentication code' => '', 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', @@ -174,6 +178,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', 'Something went wrong' => '', @@ -189,23 +194,23 @@ return [ 'This username has already been taken' => '', 'This will disable two-factor auth. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', + 'This will disable two factor authentication. Are you sure?' => '', 'Time zone' => '', 'Time zone is not valid' => '', - 'Two Factor Authentication' => '', - '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' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', 'Unable to confirm user. Please, try again.' => '', 'Unable to create an account.' => '', 'Unable to create authorization item.' => '', 'Unable to create new authorization rule.' => '', 'Unable to delete user. Please, try again later.' => '', - 'Unable to disable two-factor authorization.' => '', + 'Unable to disable Two factor authentication.' => '', 'Unable to remove authorization item.' => '', 'Unable to send confirmation link' => '', + 'Unable to send recovery message to the user' => '', 'Unable to update authorization item.' => '', 'Unable to update authorization rule.' => '', 'Unable to update block status.' => '', @@ -218,7 +223,9 @@ return [ 'Update rule' => '', 'Update user account' => '', 'Updated at' => '', + 'User account could not be created.' => '', 'User block status has been updated.' => '', + 'User could not be registered.' => '', 'User has been confirmed' => '', 'User has been created' => '', 'User has been deleted' => '', @@ -262,9 +269,19 @@ return [ 'Class "{0}" does not exist' => '@@@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', 'Registration ip' => '@@@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@@@', ]; diff --git a/src/User/resources/i18n/hu/usuario.php b/src/User/resources/i18n/hu/usuario.php index b172291..2b0e75c 100644 --- a/src/User/resources/i18n/hu/usuario.php +++ b/src/User/resources/i18n/hu/usuario.php @@ -18,6 +18,7 @@ */ return [ 'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', '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' => '', @@ -37,6 +38,12 @@ return [ '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 password' => '', 'Invalid two-factor code' => '', + 'Disable two factor authentication' => '', + 'Enable' => '', + 'Enable two factor authentication' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', + 'Invalid two factor authentication code' => '', 'Last login' => '', 'Never' => '', 'Once you have deleted your data, you will not longer be able to sign in with this account.' => '', @@ -46,6 +53,7 @@ return [ 'Required "secret" cannot be empty.' => '', 'Role "{0}" not found. Creating it.' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'The "recaptcha" component must be configured.' => '', 'The verification code is incorrect.' => '', 'This will disable two-factor auth. Are you sure?' => '', @@ -58,6 +66,16 @@ return [ 'Two-factor authorization has been disabled.' => '', 'Two-factor code' => '', 'Unable to disable two-factor authorization.' => '', + 'This will disable two factor authentication. Are you sure?' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', + 'Unable to disable Two factor authentication.' => '', + 'Unable to send recovery message to the user' => '', + 'User account could not be created.' => '', + 'User could not be registered.' => '', 'User not found.' => '', 'Verification failed. Please, enter new code.' => '', 'We couldn\'t re-send the mail to confirm your address. Please, verify is the correct email or if it has been confirmed already.' => '', @@ -71,6 +89,16 @@ return [ 'Awesome, almost there. ' => '@@Szuper, majdnem kész.@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@A cím megerősítéséhez nem tudtuk újra elküldeni az e-mailt.@@', 'We have sent confirmation links to both old and new email addresses. ' => '@@Megerősítő linkeket küldtünk régi és új e-mail címekre.@@', '(not set)' => '(nincs beállítva)', diff --git a/src/User/resources/i18n/it/usuario.php b/src/User/resources/i18n/it/usuario.php index e70556f..53225ca 100644 --- a/src/User/resources/i18n/it/usuario.php +++ b/src/User/resources/i18n/it/usuario.php @@ -73,6 +73,43 @@ return [ to facilitate the operation of this site. For more information read our {privacyPolicy}' => '@@@@', 'We couldn\'t re-send the mail to confirm your address. ' => '@@Non è stato possibile reinviare l\'email per confermare il tuo indirizzo. @@', 'We have sent confirmation links to both old and new email addresses. ' => '@@Abbiamo inviato un link di conferma sia al nuovo che al vecchio 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.', + 'Are you sure you wish to send a password recovery email to this user?' => 'Sicuro di voler inviare un email di recupero password a questo utente?', + '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.', + 'Awesome, almost there. Now you need to click the confirmation link sent to your old email address.' => 'Fantastico, ci siamo quasi. Ora devi solo visitare il collegamento di conferma che è stato inviato al tuo vecchio indirizzo email.', + 'Cancel' => 'Annulla', + 'Cannot assign role "{0}" as the AuthManager is not configured on your console application.' => 'Impossibile assegnare il ruolo "{0}" perché l\'AuthManager non è configurato nella applicazione da console.', + 'Close' => 'Chiudi', + 'Disable two factor authentication' => 'Disabilita autenticazione a due fattori', + 'Enable' => 'Abilita', + 'Enable two factor authentication' => 'Abilita l\'autenticazione a due fattori', + 'Error sending registration message to "{email}". Please try again later.' => 'C\'è stato un errore nell\'invio del messaggio di registrazione all\'indirizzo "{email}". Per favore ritenta più tardi.', + 'Error sending welcome message to "{email}". Please try again later.' => 'C\'è stato un errore nell\'invio del messaggio di benvenuto all\'indirizzo "{email}". Per favore ritenta più tardi.', + 'Invalid two factor authentication code' => 'Il codice dell\'autenticazione a due fattori non è valido', + 'Last login' => 'Ultimo accesso', + 'Never' => 'Mai', + 'Required "key" cannot be empty.' => 'Il campo "chiave" è richiesto, non può essere vuoto.', + 'Required "secret" cannot be empty.' => 'Il campo "segreto" è richiesto, non può essere vuoto.', + 'Role "{0}" not found. Creating it.' => 'Ruolo "{0}" non trovato. È stato creato.', + '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.', + 'Send password recovery email' => 'Invia email di recupero password', + 'The "recaptcha" component must be configured.' => 'Occorre configurare il componente "recaptcha".', + 'The verification code is incorrect.' => 'Il codice di verifica non è corretto.', + 'This will disable two factor authentication. Are you sure?' => 'Stai per disabilitare l\'autenticazione a due fattori. Sei sicuro?', + '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 against stolen credentials' => 'L\'autenticazione a due fattori può proteggerti dal furto di credenziali', + 'Two factor authentication successfully enabled.' => 'Autenticazione a due fattori abilitata con successo.', + 'Unable to disable Two factor authentication.' => 'Impossibile disabilitare l\'autenticazione a due fattori.', + 'Unable to send recovery message to the user' => 'Impossibile inviare il messaggio di recupero password all\'utente', + 'User account could not be created.' => 'Impossibile creare il nuovo utente.', + 'User could not be registered.' => 'Impossibile registrare l\'utente.', + 'User not found.' => 'Utente non trovato.', + 'Verification failed. Please, enter new code.' => 'Verifica fallita. Per favore inserisci un nuovo codice.', + 'We couldn\'t re-send the mail to confirm your address. Please, verify is the correct email or if it has been confirmed already.' => 'Non siamo riusciti ad inviare una email di conferma al tuo indirizzo. Per favore verifica che sia corretto e che non sia già stato confermato.', + 'We have sent confirmation links to both old and new email addresses. You must click both links to complete your request.' => 'Abbiamo inviato un link di conferma sia al vecchio che al nuovo indirizzo email. Devi visitare entrambi i link per completare la richiesta.', + '{0} cannot be blank.' => '{0} non può essere vuoto.', '(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 new confirmation link has been sent' => 'È stato inviato un nuovo link di conferma', @@ -211,7 +248,7 @@ return [ 'There is neither role nor permission with name "{0}"' => 'Non esiste un ruolo o permesso di nome "{0}', 'This account has already been connected to another user' => 'Questo account è già stato associato ad un altro utente', 'This email address has already been taken' => 'Questo indirizzo email è già stato registrato', - 'This username has already been taken' => 'Questo nome utente è già stato registraot', + 'This username has already been taken' => 'Questo nome utente è già stato registrato', 'Time zone' => 'Fuso orario', 'Time zone is not valid' => 'Il fuso orario non è valido', 'Unable to confirm user. Please, try again.' => 'Impossibile confermare l\'utente, per favore ritenta.', diff --git a/src/User/resources/i18n/kk/usuario.php b/src/User/resources/i18n/kk/usuario.php index 5b39d05..89759e9 100644 --- a/src/User/resources/i18n/kk/usuario.php +++ b/src/User/resources/i18n/kk/usuario.php @@ -35,6 +35,7 @@ return [ 'Are you sure you want to delete this user?' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you want to unblock this user?' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', 'Are you sure? Deleted user can not be restored' => '', 'Are you sure? There is no going back' => '', 'Assignments' => '', @@ -88,18 +89,20 @@ return [ 'Deleted by GDPR request' => '', 'Description' => '', 'Didn\'t receive confirmation message?' => '', - 'Disable Two-Factor Auth' => '', + 'Disable two factor authentication' => '', 'Disconnect' => '', 'Don\'t have an account? Sign up!' => '', 'Download my data' => '', 'Email' => '', 'Email (public)' => '', 'Enable' => '', - 'Enable Two-factor auth' => '', + 'Enable two factor authentication' => '', 'Error occurred while changing password' => '', 'Error occurred while confirming user' => '', 'Error occurred while deleting user' => '', 'Export my data' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -118,6 +121,7 @@ return [ 'Invalid or expired link' => '', 'Invalid password' => '', 'Invalid two-factor code' => '', + 'Invalid two factor authentication code' => '', 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', @@ -174,6 +178,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', 'Something went wrong' => '', @@ -189,23 +194,23 @@ return [ 'This username has already been taken' => '', 'This will disable two-factor auth. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', + 'This will disable two factor authentication. Are you sure?' => '', 'Time zone' => '', 'Time zone is not valid' => '', - 'Two Factor Authentication' => '', - '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' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', 'Unable to confirm user. Please, try again.' => '', 'Unable to create an account.' => '', 'Unable to create authorization item.' => '', 'Unable to create new authorization rule.' => '', 'Unable to delete user. Please, try again later.' => '', - 'Unable to disable two-factor authorization.' => '', + 'Unable to disable Two factor authentication.' => '', 'Unable to remove authorization item.' => '', 'Unable to send confirmation link' => '', + 'Unable to send recovery message to the user' => '', 'Unable to update authorization item.' => '', 'Unable to update authorization rule.' => '', 'Unable to update block status.' => '', @@ -218,7 +223,9 @@ return [ 'Update rule' => '', 'Update user account' => '', 'Updated at' => '', + 'User account could not be created.' => '', 'User block status has been updated.' => '', + 'User could not be registered.' => '', 'User has been confirmed' => '', 'User has been created' => '', 'User has been deleted' => '', @@ -262,9 +269,19 @@ return [ 'Class "{0}" does not exist' => '@@@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', 'Registration ip' => '@@@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@@@', ]; diff --git a/src/User/resources/i18n/lt/usuario.php b/src/User/resources/i18n/lt/usuario.php index 5b39d05..89759e9 100644 --- a/src/User/resources/i18n/lt/usuario.php +++ b/src/User/resources/i18n/lt/usuario.php @@ -35,6 +35,7 @@ return [ 'Are you sure you want to delete this user?' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you want to unblock this user?' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', 'Are you sure? Deleted user can not be restored' => '', 'Are you sure? There is no going back' => '', 'Assignments' => '', @@ -88,18 +89,20 @@ return [ 'Deleted by GDPR request' => '', 'Description' => '', 'Didn\'t receive confirmation message?' => '', - 'Disable Two-Factor Auth' => '', + 'Disable two factor authentication' => '', 'Disconnect' => '', 'Don\'t have an account? Sign up!' => '', 'Download my data' => '', 'Email' => '', 'Email (public)' => '', 'Enable' => '', - 'Enable Two-factor auth' => '', + 'Enable two factor authentication' => '', 'Error occurred while changing password' => '', 'Error occurred while confirming user' => '', 'Error occurred while deleting user' => '', 'Export my data' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -118,6 +121,7 @@ return [ 'Invalid or expired link' => '', 'Invalid password' => '', 'Invalid two-factor code' => '', + 'Invalid two factor authentication code' => '', 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', @@ -174,6 +178,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', 'Something went wrong' => '', @@ -189,23 +194,23 @@ return [ 'This username has already been taken' => '', 'This will disable two-factor auth. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', + 'This will disable two factor authentication. Are you sure?' => '', 'Time zone' => '', 'Time zone is not valid' => '', - 'Two Factor Authentication' => '', - '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' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', 'Unable to confirm user. Please, try again.' => '', 'Unable to create an account.' => '', 'Unable to create authorization item.' => '', 'Unable to create new authorization rule.' => '', 'Unable to delete user. Please, try again later.' => '', - 'Unable to disable two-factor authorization.' => '', + 'Unable to disable Two factor authentication.' => '', 'Unable to remove authorization item.' => '', 'Unable to send confirmation link' => '', + 'Unable to send recovery message to the user' => '', 'Unable to update authorization item.' => '', 'Unable to update authorization rule.' => '', 'Unable to update block status.' => '', @@ -218,7 +223,9 @@ return [ 'Update rule' => '', 'Update user account' => '', 'Updated at' => '', + 'User account could not be created.' => '', 'User block status has been updated.' => '', + 'User could not be registered.' => '', 'User has been confirmed' => '', 'User has been created' => '', 'User has been deleted' => '', @@ -262,9 +269,19 @@ return [ 'Class "{0}" does not exist' => '@@@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', 'Registration ip' => '@@@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@@@', ]; diff --git a/src/User/resources/i18n/nl/usuario.php b/src/User/resources/i18n/nl/usuario.php index 5b39d05..89759e9 100644 --- a/src/User/resources/i18n/nl/usuario.php +++ b/src/User/resources/i18n/nl/usuario.php @@ -35,6 +35,7 @@ return [ 'Are you sure you want to delete this user?' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you want to unblock this user?' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', 'Are you sure? Deleted user can not be restored' => '', 'Are you sure? There is no going back' => '', 'Assignments' => '', @@ -88,18 +89,20 @@ return [ 'Deleted by GDPR request' => '', 'Description' => '', 'Didn\'t receive confirmation message?' => '', - 'Disable Two-Factor Auth' => '', + 'Disable two factor authentication' => '', 'Disconnect' => '', 'Don\'t have an account? Sign up!' => '', 'Download my data' => '', 'Email' => '', 'Email (public)' => '', 'Enable' => '', - 'Enable Two-factor auth' => '', + 'Enable two factor authentication' => '', 'Error occurred while changing password' => '', 'Error occurred while confirming user' => '', 'Error occurred while deleting user' => '', 'Export my data' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -118,6 +121,7 @@ return [ 'Invalid or expired link' => '', 'Invalid password' => '', 'Invalid two-factor code' => '', + 'Invalid two factor authentication code' => '', 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', @@ -174,6 +178,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', 'Something went wrong' => '', @@ -189,23 +194,23 @@ return [ 'This username has already been taken' => '', 'This will disable two-factor auth. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', + 'This will disable two factor authentication. Are you sure?' => '', 'Time zone' => '', 'Time zone is not valid' => '', - 'Two Factor Authentication' => '', - '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' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', 'Unable to confirm user. Please, try again.' => '', 'Unable to create an account.' => '', 'Unable to create authorization item.' => '', 'Unable to create new authorization rule.' => '', 'Unable to delete user. Please, try again later.' => '', - 'Unable to disable two-factor authorization.' => '', + 'Unable to disable Two factor authentication.' => '', 'Unable to remove authorization item.' => '', 'Unable to send confirmation link' => '', + 'Unable to send recovery message to the user' => '', 'Unable to update authorization item.' => '', 'Unable to update authorization rule.' => '', 'Unable to update block status.' => '', @@ -218,7 +223,9 @@ return [ 'Update rule' => '', 'Update user account' => '', 'Updated at' => '', + 'User account could not be created.' => '', 'User block status has been updated.' => '', + 'User could not be registered.' => '', 'User has been confirmed' => '', 'User has been created' => '', 'User has been deleted' => '', @@ -262,9 +269,19 @@ return [ 'Class "{0}" does not exist' => '@@@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', 'Registration ip' => '@@@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@@@', ]; diff --git a/src/User/resources/i18n/pl/usuario.php b/src/User/resources/i18n/pl/usuario.php index 113d46c..8ad2fe7 100644 --- a/src/User/resources/i18n/pl/usuario.php +++ b/src/User/resources/i18n/pl/usuario.php @@ -31,9 +31,17 @@ return [ 'Once you have deleted your data, you will not longer be able to sign in with this account.' => '', 'Privacy' => '', 'Privacy settings' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', + 'Cannot assign role "{0}" as the AuthManager is not configured on your console application.' => '', + 'Disable two factor authentication' => '', + 'Enable two factor authentication' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', + 'Invalid two factor authentication code' => '', 'Required "key" cannot be empty.' => '', 'Required "secret" cannot be empty.' => '', 'Role "{0}" not found. Creating it.' => '', + 'Send password recovery email' => '', 'The "recaptcha" component must be configured.' => '', 'The verification code is incorrect.' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', @@ -44,6 +52,29 @@ return [ '{0} cannot be blank.' => '', '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}' => '@@@@', + 'This will disable two factor authentication. Are you sure?' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', + 'Unable to disable Two factor authentication.' => '', + 'Unable to send recovery message to the user' => '', + 'User account could not be created.' => '', + 'User could not be registered.' => '', + '{0} cannot be blank.' => '', + 'Disable Two-Factor Auth' => '@@Wyłącz uwierzytelnianie dwuetapowe@@', + 'Enable Two-factor auth' => '@@Włącz uwierzytelnianie dwuetapowe@@', + 'Invalid two-factor code' => '@@Nieprawidłowy kod uwierzytelniania dwuetapowego@@', + 'This will disable two-factor auth. Are you sure?' => '@@To wyłączy uwierzytelnianie dwuetapowe. Czy jesteś pewny?@@', + 'Two Factor Authentication' => '@@Uwierzytelnianie dwuetapowe@@', + 'Two factor successfully enabled.' => '@@Dwuetapowe uwierzytelnianie poprawnie włączone.@@', + 'Two-Factor Authentication' => '@@Uwierzytelnianie dwuetapowe@@', + 'Two-factor auth protects you against stolen credentials' => '@@Uwierzytelnianie dwuetapowe chroni Cię przed kradzieżą danych logowania@@', + 'Two-factor authentication code' => '@@Kod uwierzytelniania dwuetapowego@@', + 'Two-factor authorization has been disabled.' => '@@Dwuetapowa autoryzacja została wyłączona.@@', + 'Two-factor code' => '@@Kod dwuetapowy@@', + 'Unable to disable two-factor authorization.' => '@@Nie można wyłączyć dwuetapowej autoryzacji.@@', '(not set)' => '(nie podano)', 'A confirmation message has been sent to your new email address' => 'Potwierdzenie zostało wysłane na Twój nowy adres email', 'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.' => 'Wysłaliśmy wiadomość na Twój adres email, zawierającą link aktywacyjny, w który musisz kliknąć, aby zakończyć rejestrację.', @@ -109,13 +140,11 @@ return [ 'Delete account' => 'Usuń konto', 'Description' => 'Opis', 'Didn\'t receive confirmation message?' => 'Nie otrzymałeś emaila aktywacyjnego?', - 'Disable Two-Factor Auth' => 'Wyłącz uwierzytelnianie dwuetapowe', 'Disconnect' => 'Odłącz', 'Don\'t have an account? Sign up!' => 'Nie masz jeszcze konto? Zarejestruj się!', 'Email' => 'Email', 'Email (public)' => 'Email (publiczny)', 'Enable' => 'Włącz', - 'Enable Two-factor auth' => 'Włącz uwierzytelnianie dwuetapowe', 'Error occurred while changing password' => 'Wystąpił błąd podczas zmiany hasła', 'Error occurred while confirming user' => 'Wystąpił błąd podczas aktywacji użytkownika', 'Error occurred while deleting user' => 'Wystąpił błąd podczas usuwania użytkownika', @@ -133,7 +162,6 @@ return [ 'Information' => 'Informacja', 'Invalid login or password' => 'Nieprawidłowy login lub hasło', 'Invalid or expired link' => 'Nieprawidłowy lub zdezaktualizowany link', - 'Invalid two-factor code' => 'Nieprawidłowy kod uwierzytelniania dwuetapowego', 'Invalid value' => 'Nieprawidłowa wartość', 'It will be deleted forever' => 'Usuniętych kont nie można przywrócić', 'Items' => 'Elementy', @@ -195,22 +223,13 @@ return [ 'This account has already been connected to another user' => 'To konto zostało już dołączone do innego użytkownika', 'This email address has already been taken' => 'Ten adres email jest już używany', 'This username has already been taken' => 'Ta nazwa użytkownika jest już zajęta', - 'This will disable two-factor auth. Are you sure?' => 'To wyłączy uwierzytelnianie dwuetapowe. Czy jesteś pewny?', 'Time zone' => 'Strefa czasowa', 'Time zone is not valid' => 'Strefa czasowa jest niepoprawna', - 'Two Factor Authentication' => 'Uwierzytelnianie dwuetapowe', - 'Two factor successfully enabled.' => 'Dwuetapowe uwierzytelnianie poprawnie włączone.', - 'Two-Factor Authentication' => 'Uwierzytelnianie dwuetapowe', - 'Two-factor auth protects you against stolen credentials' => 'Uwierzytelnianie dwuetapowe chroni Cię przed kradzieżą danych logowania', - 'Two-factor authentication code' => 'Kod uwierzytelniania dwuetapowego', - 'Two-factor authorization has been disabled.' => 'Dwuetapowa autoryzacja została wyłączona.', - 'Two-factor code' => 'Kod dwuetapowy', 'Unable to confirm user. Please, try again.' => 'Nie można aktywować użytkownika. Proszę spróbować ponownie.', 'Unable to create an account.' => 'Nie można utworzyć konta.', 'Unable to create authorization item.' => 'Nie można utworzyć celu autoryzacji.', 'Unable to create new authorization rule.' => 'Nie można utworzyć zasady autoryzacji.', 'Unable to delete user. Please, try again later.' => 'Nie można usunąć użytkownika. Proszę spróbować ponownie później.', - 'Unable to disable two-factor authorization.' => 'Nie można wyłączyć dwuetapowej autoryzacji.', 'Unable to remove authorization item.' => 'Nie można usunąć celu autoryzacji.', 'Unable to send confirmation link' => 'Nie można wysłać linka aktywacyjnego', 'Unable to update authorization item.' => 'Nie można zaktualizować celu autoryzacji.', diff --git a/src/User/resources/i18n/pt-BR/usuario.php b/src/User/resources/i18n/pt-BR/usuario.php index 5b39d05..d22a901 100644 --- a/src/User/resources/i18n/pt-BR/usuario.php +++ b/src/User/resources/i18n/pt-BR/usuario.php @@ -267,4 +267,251 @@ return [ 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', 'We couldn\'t re-send the mail to confirm your address. ' => '@@@@', 'We have sent confirmation links to both old and new email addresses. ' => '@@@@', + 'Disable two factor authentication' => '', + 'Enable two factor authentication' => '', + 'Invalid two factor authentication code' => '', + 'This will disable two factor authentication. Are you sure?' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', + 'Unable to disable Two factor authentication.' => '', + '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á.@@', + 'Class "{0}" does not exist' => '@@A classe "{0}" não existe@@', + 'Disable Two-Factor Auth' => '@@Desabilitar autenticação em dois fatores@@', + 'Enable Two-factor auth' => '@@Habilitar autenticação em dois fatores@@', + 'Invalid two-factor code' => '@@Código de dois fatores inválido@@', + 'Registration ip' => '@@Registro ip@@', + 'Rule class can not be instantiated' => '@@A classe de regras não pode ser instanciada@@', + 'Rule class must extend "yii\\rbac\\Rule"' => '@@A classe de regras deve estender de "yii\\rbac\\Rule"@@', + 'This will disable two-factor auth. Are you sure?' => '@@Isso desativará a autenticação de dois fatores. Você tem certeza?@@', + 'Two Factor Authentication' => '@@Autenticação de dois fatores@@', + 'Two factor successfully enabled.' => '@@Dois fatores habilitados com sucesso.@@', + 'Two-Factor Authentication' => '@@Autenticação de dois fatores@@', + 'Two-factor auth protects you against stolen credentials' => '@@Autenticação de dois fatores protege você contra credenciais roubadas@@', + 'Two-factor authentication code' => '@@Código de autenticação de dois fatores@@', + 'Two-factor authorization has been disabled.' => '@@A autorização de dois fatores foi desabilitada.@@', + 'Two-factor code' => '@@Código de dois fatores@@', + 'Unable to disable two-factor authorization.' => '@@Não é possível desabilitar a autorização de dois fatores.@@', + 'We couldn\'t re-send the mail to confirm your address. ' => '@@Não poderíamos re-enviar o correio para confirmar o seu endereço.@@', + 'We have sent confirmation links to both old and new email addresses. ' => '@@Enviamos links de confirmação para endereços de e-mail antigo e novo.@@', + '(not set)' => '(não informado)', + 'A confirmation message has been sent to your new email address' => 'Uma mensagem de confirmação foi enviada para seu novo endereço de e-mail', + 'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.' => 'Uma mensagem foi enviada para o seu endereço de e-mail. Ele contém um link de confirmação que você deve clicar para completar o registro.', + 'A new confirmation link has been sent' => 'Um novo link de confirmação foi enviado', + 'A password will be generated automatically if not provided' => 'Uma senha será gerada automaticamente se não for fornecida', + 'Account' => 'Conta', + 'Account confirmation' => 'Confirmação da conta', + 'Account details' => 'Detalhes da conta', + '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?', + 'Are you sure you want to delete this user?' => 'Tem certeza de que deseja excluir esse usuário?', + 'Are you sure you want to switch to this user for the rest of this Session?' => 'Tem certeza de que deseja mudar para este usuário para o resto desta Sessão?', + 'Are you sure you want to unblock this user?' => 'Tem certeza de que deseja desbloquear esse usuário?', + 'Are you sure you wish to send a password recovery email to this user?' => 'Tem certeza de que deseja enviar um email de recuperação de senha para este usuário?', + 'Are you sure? Deleted user can not be restored' => 'Você tem certeza? O usuário excluído não pode ser restaurado', + 'Are you sure? There is no going back' => 'Você tem certeza? Não há retorno', + 'Assignments' => 'Atribuições', + 'Assignments have been updated' => 'Atribuições atualizadas', + 'Auth item with such name already exists' => 'O item com esse nome já existe', + 'Authentication rule class {0} can not be instantiated' => 'A classe de regras de autenticação {0} não pode ser instanciada', + 'Authorization item successfully created.' => 'Item de autorização criado com sucesso.', + 'Authorization item successfully removed.' => 'Item de autorização removido com sucesso.', + 'Authorization item successfully updated.' => 'Item de autorização atualizado com sucesso.', + 'Authorization rule has been added.' => 'A regra de autorização foi adicionada.', + 'Authorization rule has been removed.' => 'A regra de autorização foi removida.', + 'Authorization rule has been updated.' => 'A regra de autorização foi atualizada.', + 'Awesome, almost there. Now you need to click the confirmation link sent to your new email address.' => 'Incrível, quase lá. Agora você precisa clicar no link de confirmação enviado ao seu novo endereço de e-mail.', + 'Awesome, almost there. Now you need to click the confirmation link sent to your old email address.' => 'Incrível, quase lá. Agora você precisa clicar no link de confirmação enviado ao seu novo endereço de e-mail.', + 'Bio' => 'Bio', + 'Block' => 'Bloquear', + 'Block status' => 'Bloquear situação', + 'Blocked at {0, date, MMMM dd, YYYY HH:mm}' => 'Bloqueado em {0, date, MMMM dd, YYYY HH:mm}', + 'Cancel' => 'Cancelar', + 'Cannot assign role "{0}" as the AuthManager is not configured on your console application.' => 'Não é possível atribuir a função "{0}" como o AuthManager não está configurado no seu aplicativo de console.', + 'Change your avatar at Gravatar.com' => 'Mude seu avatar para Gravatar.com', + 'Children' => 'Crianças', + 'Class' => 'Classe', + 'Close' => 'Fechar', + 'Complete password reset on {0}' => 'Reinicialização completa da senha em {0}', + 'Confirm' => 'Confirmar', + 'Confirm account on {0}' => 'Confirme a conta em {0}', + 'Confirm email change on {0}' => 'Confirme alteração do e-mail em', + 'Confirmation' => 'Confirmação', + 'Confirmation status' => 'Status de confirmação', + 'Confirmation time' => 'Hora de confirmação', + 'Confirmed' => 'Confirmado', + 'Confirmed at {0, date, MMMM dd, YYYY HH:mm}' => 'Confirmado em {0, date, MMMM dd, YYYY HH:mm}', + 'Connect' => 'Conectado', + 'Continue' => 'Continuar', + 'Create' => 'Criar', + 'Create a user account' => 'Criar uma conta de usuário', + 'Create new permission' => 'Criar nova permissão', + 'Create new role' => 'Criar nova função', + 'Create new rule' => 'Criar nova regra', + 'Created at' => 'Criado em', + 'Credentials will be sent to the user by email' => 'As credenciais serão enviadas ao usuário por e-mail', + 'Current password' => 'Senha atual', + 'Current password is not valid' => 'Senha atual inválida', + 'Delete' => 'Excluir', + 'Delete account' => 'Excluir conta', + 'Description' => 'Descrição', + 'Didn\'t receive confirmation message?' => 'Não recebeu mensagem de confirmação?', + 'Disconnect' => 'Desconectar', + 'Don\'t have an account? Sign up!' => 'Não tem uma conta? Inscrever-se!', + 'Email' => 'Email', + 'Email (public)' => 'Email (publico)', + 'Enable' => 'Habilitado', + 'Error occurred while changing password' => 'Ocorreu um erro ao mudar a senha', + 'Error occurred while confirming user' => 'Ocorreu um erro ao confirmar o usuário', + 'Error occurred while deleting user' => 'Ocorreu um erro ao excluir o usuário', + 'Error sending registration message to "{email}". Please try again later.' => 'Erro ao enviar a mensagem de registro para "{email}". Por favor, tente novamente mais tarde.', + 'Error sending welcome message to "{email}". Please try again later.' => 'Erro ao enviar a mensagem de boas-vindas para "{email}". Por favor, tente novamente mais tarde.', + 'Finish' => 'Terminar', + 'Forgot password?' => 'Esqueceu a senha?', + 'Gravatar email' => 'E-mail do Gravatar', + 'Hello' => 'Olá', + 'If you already registered, sign in and connect this account on settings page' => 'Se você já se registrou, faça login e conecte esta conta na página de configurações', + 'If you cannot click the link, please try pasting the text into your browser' => 'Se você não pode clicar no link, tente colar o texto em seu navegador', + 'If you did not make this request you can ignore this email' => 'Se você não fez essa solicitação, ignore este e-mail', + 'Impersonate this user' => 'Representar este usuário', + 'In order to complete your registration, please click the link below' => 'Para completar seu registro, clique no link abaixo', + 'In order to complete your request, please click the link below' => 'Para completar seu pedido, clique no link abaixo', + 'In order to finish your registration, we need you to enter following fields' => 'Para terminar seu registro, precisamos que você insira os seguintes campos', + 'Information' => 'Informação', + 'Invalid login or password' => 'Login ou senha inválidos', + 'Invalid or expired link' => 'Link inválido ou expirado', + 'Invalid value' => 'Valor inválido', + 'It will be deleted forever' => 'Ele será excluído para sempre', + 'Items' => 'Itens', + 'Joined on {0, date}' => 'Juntou-se em {0, date}', + 'Last login' => 'Último login', + 'Location' => 'Localização', + 'Login' => 'Entrar', + 'Logout' => 'Sair', + 'Manage users' => 'Gerenciar usuários', + 'Name' => 'Nome', + 'Networks' => 'Rede', + 'Never' => 'Nunca', + 'New email' => 'Novo Email', + 'New password' => 'Nova Senha', + 'New permission' => 'Nova permissão', + 'New role' => 'Nova função', + 'New rule' => 'Nova regra', + 'New user' => 'Novo usuário', + 'Not blocked' => 'Não bloqueado', + 'Not found' => 'Não encontrado', + 'Once you delete your account, there is no going back' => 'Depois de excluir sua conta, não há retorno', + 'Password' => 'Senha', + 'Password has been changed' => 'Senha alterada', + 'Permissions' => 'Permissões', + 'Please be certain' => 'Tenha certeza', + 'Please click the link below to complete your password reset' => 'Clique no link abaixo para completar a reposição da senha', + 'Please fix following errors:' => 'Corrija os seguintes erros:', + 'Profile' => 'Perfil', + 'Profile details' => 'Detalhes de perfil', + 'Profile details have been updated' => 'Os detalhes do perfil foram atualizados', + 'Profile settings' => 'Configuração de Perfil', + 'Recover your password' => 'Recupere sua senha', + 'Recovery link is invalid or expired. Please try requesting a new one.' => 'O link de recuperação é inválido ou expirou. Por favor, tente solicitar um novo.', + 'Recovery message sent' => 'Mensagem de recuperação enviada', + 'Registration IP' => 'IP de registro', + 'Registration on this website is disabled' => 'O registro neste site está desativado', + 'Registration time' => 'Tempo de registro', + 'Remember me next time' => 'Lembre-me da próxima vez', + 'Request new confirmation message' => 'Solicitar nova mensagem de confirmação', + 'Required "key" cannot be empty.' => 'A "chave" necessária não pode estar vazia.', + 'Required "secret" cannot be empty.' => 'O "segredo" necessário não pode estar vazio.', + 'Reset your password' => 'Redefinir sua senha', + 'Role "{0}" not found. Creating it.' => 'O função "{0}" não foi encontrado. Crie-a.', + 'Roles' => 'Função', + 'Rule' => 'Regra', + 'Rule class must extend "yii\\rbac\\Rule".' => 'A classe de regras deve estender de "yii\\rbac\\Rule".', + 'Rule name' => 'Nome da regra', + 'Rule name {0} is already in use' => 'O nome da regra {0} já está em uso', + 'Rule {0} does not exists' => 'A regra {0} não existe', + 'Rule {0} not found.' => 'Regra {0} não encontrada.', + 'Rules' => 'Regras', + 'Save' => 'Gravar', + 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => 'Digitalize o QrCode com o Google Authenticator App, então insira seu código temporário na caixa e envie.', + 'Send password recovery email' => 'Enviar email de recuperação de senha', + 'Sign in' => 'Criar conta', + 'Sign up' => 'Acessar', + 'Something went wrong' => 'Algo deu errado', + 'Switch identities is disabled.' => 'Alterar identidades está desabilitada.', + 'Thank you for signing up on {0}' => 'Obrigado por se inscrever no {0}', + 'Thank you, registration is now complete.' => 'Obrigado, o registro está completo.', + 'The "recaptcha" component must be configured.' => 'O componente "recaptcha" deve ser configurado.', + 'The confirmation link is invalid or expired. Please try requesting a new one.' => 'O link de confirmação é inválido ou expirou. Por favor, tente solicitar um novo.', + 'The verification code is incorrect.' => 'O código de verificação está incorreto.', + 'There is neither role nor permission with name "{0}"' => 'Não há papel nem permissão com o nome "{0}"', + 'This account has already been connected to another user' => 'Esta conta já foi conectada a outro usuário', + 'This email address has already been taken' => 'Este endereço de e-mail já foi feito', + 'This username has already been taken' => 'Este nome de usuário já foi feito', + 'Time zone' => 'Fuso horário', + 'Time zone is not valid' => 'O fuso horário não é válido', + 'Unable to confirm user. Please, try again.' => 'Não é possível confirmar o usuário. Por favor, tente novamente.', + 'Unable to create an account.' => 'Não é possível criar uma conta.', + 'Unable to create authorization item.' => 'Não foi possível criar o item de autorização.', + 'Unable to create new authorization rule.' => 'Não é possível criar uma nova regra de autorização.', + 'Unable to delete user. Please, try again later.' => 'Não é possível excluir o usuário. Por favor, tente novamente mais tarde.', + 'Unable to remove authorization item.' => 'Não é possível remover o item de autorização.', + 'Unable to send confirmation link' => 'Não é possível enviar o link de confirmação', + 'Unable to send recovery message to the user' => 'Não é possível enviar uma mensagem de recuperação para o usuário', + 'Unable to update authorization item.' => 'Não foi possível atualizar o item de autorização.', + 'Unable to update authorization rule.' => 'Não é possível atualizar a regra de autorização', + 'Unable to update block status.' => 'Não é possível atualizar o status do bloco', + 'Unblock' => 'Desbloquear', + 'Unconfirmed' => 'Não confirmado', + 'Update' => 'Altera', + 'Update assignments' => 'Atualizar atribuições', + 'Update permission' => 'Permissão de atualização', + 'Update role' => 'Atualizar função', + 'Update rule' => 'Atualizar regra', + 'Update user account' => 'Atualizar conta de usuário', + 'Updated at' => 'Atualizado em', + 'User account could not be created.' => 'A conta de usuário não pôde ser criada', + 'User block status has been updated.' => 'O status do bloco do usuário foi atualizado', + 'User could not be registered.' => 'O usuário não pôde ser registrado.', + 'User has been confirmed' => 'O usuário foi confirmado', + 'User has been created' => 'O usuário foi criado', + 'User has been deleted' => 'O usuário foi excluído', + 'User is not found' => 'O usuário não foi encontrado', + 'User not found.' => 'O usuário não encontrado', + 'Username' => 'Nome de usuário', + 'Users' => 'Usuários', + 'VKontakte' => 'VKontakte', + 'Verification failed. Please, enter new code.' => 'Falha na verificação. Por favor, insira um 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 re-enviar o email para confirmar o seu endereço. Por favor, verifique se o e-mail correto ou se já foi confirmado', + 'We have generated a password for you' => 'Nós geramos uma senha para você', + 'We have received a request to change the email address for your account on {0}' => 'Recebemos um pedido para alterar o endereço de e-mail da sua conta em {0}', + 'We have received a request to reset the password for your account on {0}' => 'Recebemos um pedido para redefinir a senha 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.' => 'Enviamos links de confirmação para endereços de e-mail antigo e novo. Você deve clicar em ambos os links para completar sua solicitação.', + 'Website' => 'Website', + 'Welcome to {0}' => 'Bem-vindo ao {0}', + 'Yandex' => 'Yandex', + 'You can assign multiple roles or permissions to user by using the form below' => 'Você pode atribuir várias funções ou permissões ao usuário usando o formulário abaixo', + 'You can connect multiple accounts to be able to log in using them' => 'Você pode conectar várias contas para poder fazer login usando elas', + 'You cannot remove your own account' => 'Você não pode remover sua própria conta', + 'You need to confirm your email address' => 'Você precisa confirmar seu endereço de e-mail', + 'Your account details have been updated' => 'Os detalhes da sua conta foram atualizados', + 'Your account has been blocked' => 'Sua conta foi bloqueada', + 'Your account has been blocked.' => 'Sua conta foi bloqueada.', + 'Your account has been completely deleted' => 'Sua conta foi completamente removida', + 'Your account has been connected' => 'Sua conta foi conectada', + 'Your account has been created' => 'Sua conta foi criada', + 'Your account has been created and a message with further instructions has been sent to your email' => 'Sua conta foi criada e uma mensagem com instruções adicionais foi enviada para o seu email', + 'Your account on {0} has been created' => 'Sua conta em {0} foi criada', + 'Your confirmation token is invalid or expired' => 'Seu token de confirmação é inválido ou expirou', + 'Your email address has been changed' => 'Seu endereço de e-mail foi alterado', + 'Your profile has been updated' => 'Seu perfil foi atualizado', + '{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/pt-PT/usuario.php b/src/User/resources/i18n/pt-PT/usuario.php index 5b39d05..89759e9 100644 --- a/src/User/resources/i18n/pt-PT/usuario.php +++ b/src/User/resources/i18n/pt-PT/usuario.php @@ -35,6 +35,7 @@ return [ 'Are you sure you want to delete this user?' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you want to unblock this user?' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', 'Are you sure? Deleted user can not be restored' => '', 'Are you sure? There is no going back' => '', 'Assignments' => '', @@ -88,18 +89,20 @@ return [ 'Deleted by GDPR request' => '', 'Description' => '', 'Didn\'t receive confirmation message?' => '', - 'Disable Two-Factor Auth' => '', + 'Disable two factor authentication' => '', 'Disconnect' => '', 'Don\'t have an account? Sign up!' => '', 'Download my data' => '', 'Email' => '', 'Email (public)' => '', 'Enable' => '', - 'Enable Two-factor auth' => '', + 'Enable two factor authentication' => '', 'Error occurred while changing password' => '', 'Error occurred while confirming user' => '', 'Error occurred while deleting user' => '', 'Export my data' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -118,6 +121,7 @@ return [ 'Invalid or expired link' => '', 'Invalid password' => '', 'Invalid two-factor code' => '', + 'Invalid two factor authentication code' => '', 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', @@ -174,6 +178,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', 'Something went wrong' => '', @@ -189,23 +194,23 @@ return [ 'This username has already been taken' => '', 'This will disable two-factor auth. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', + 'This will disable two factor authentication. Are you sure?' => '', 'Time zone' => '', 'Time zone is not valid' => '', - 'Two Factor Authentication' => '', - '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' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', 'Unable to confirm user. Please, try again.' => '', 'Unable to create an account.' => '', 'Unable to create authorization item.' => '', 'Unable to create new authorization rule.' => '', 'Unable to delete user. Please, try again later.' => '', - 'Unable to disable two-factor authorization.' => '', + 'Unable to disable Two factor authentication.' => '', 'Unable to remove authorization item.' => '', 'Unable to send confirmation link' => '', + 'Unable to send recovery message to the user' => '', 'Unable to update authorization item.' => '', 'Unable to update authorization rule.' => '', 'Unable to update block status.' => '', @@ -218,7 +223,9 @@ return [ 'Update rule' => '', 'Update user account' => '', 'Updated at' => '', + 'User account could not be created.' => '', 'User block status has been updated.' => '', + 'User could not be registered.' => '', 'User has been confirmed' => '', 'User has been created' => '', 'User has been deleted' => '', @@ -262,9 +269,19 @@ return [ 'Class "{0}" does not exist' => '@@@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', 'Registration ip' => '@@@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@@@', ]; diff --git a/src/User/resources/i18n/ro/usuario.php b/src/User/resources/i18n/ro/usuario.php index 454329a..a536e86 100644 --- a/src/User/resources/i18n/ro/usuario.php +++ b/src/User/resources/i18n/ro/usuario.php @@ -18,6 +18,7 @@ */ return [ 'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', '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' => '', @@ -37,6 +38,12 @@ return [ '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 password' => '', 'Invalid two-factor code' => '', + 'Disable two factor authentication' => '', + 'Enable' => '', + 'Enable two factor authentication' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', + 'Invalid two factor authentication code' => '', 'Last login' => '', 'Never' => '', 'Once you have deleted your data, you will not longer be able to sign in with this account.' => '', @@ -46,6 +53,7 @@ return [ 'Required "secret" cannot be empty.' => '', 'Role "{0}" not found. Creating it.' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'The "recaptcha" component must be configured.' => '', 'The verification code is incorrect.' => '', 'This will disable two-factor auth. Are you sure?' => '', @@ -58,6 +66,16 @@ return [ 'Two-factor authorization has been disabled.' => '', 'Two-factor code' => '', 'Unable to disable two-factor authorization.' => '', + 'This will disable two factor authentication. Are you sure?' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', + 'Unable to disable Two factor authentication.' => '', + 'Unable to send recovery message to the user' => '', + 'User account could not be created.' => '', + 'User could not be registered.' => '', 'User not found.' => '', 'Verification failed. Please, enter new code.' => '', 'We couldn\'t re-send the mail to confirm your address. Please, verify is the correct email or if it has been confirmed already.' => '', @@ -71,6 +89,16 @@ return [ 'Awesome, almost there. ' => '@@Minunat, aproape acolo.@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@Nu am putut retrimite mesajul pentru a vă confirma adresa.@@', 'We have sent confirmation links to both old and new email addresses. ' => '@@Am trimis linkuri de confirmare adresa de e-mail vechi și cel noi.@@', '(not set)' => '(nu este setat)', diff --git a/src/User/resources/i18n/ru/usuario.php b/src/User/resources/i18n/ru/usuario.php index c4c3246..cb8021b 100644 --- a/src/User/resources/i18n/ru/usuario.php +++ b/src/User/resources/i18n/ru/usuario.php @@ -72,15 +72,41 @@ return [ 'Class "{0}" does not exist' => '@@Класс "{0}" не найден@@', '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}' => '@@@@', + 'Disable two factor authentication' => 'Выключить двухфакторную авторизацию', + 'Enable two factor authentication' => 'Включить двухфакторную авторизацию', + 'Invalid two factor authentication code' => 'Неверный код двухфакторной авторизации', + 'This will disable two factor authentication. Are you sure?' => 'Двухфакторная авторизация будет отключена. Вы уверены?', + 'Two Factor Authentication (2FA)' => 'Двухфакторная авторизация (2FA)', + 'Two factor authentication code' => 'Код двухфакторной авторизации', + 'Two factor authentication has been disabled.' => 'Двухфакторная авторизация отключена.', + 'Two factor authentication protects you against stolen credentials' => 'Двухфакторная авторизация защитит вас от кражи параметров доступа', + 'Two factor authentication successfully enabled.' => 'Двухфакторная авторизация успешно включена.', + 'Unable to disable Two factor authentication.' => 'Не удалось отключить двухфакторную авторизацию.', + 'A message has been sent to your email address. ' => '@@Сообщение было отправлено на вашу электронную почту@@', + 'Awesome, almost there. ' => '@@Замечательно, почти готово!@@', + 'Class "{0}" does not exist' => '@@Класс "{0}" не найден@@', + 'Disable Two-Factor Auth' => '@@Отключить двухфакторную авторизацию@@', + 'Enable Two-factor auth' => '@@Включить двухфакторную авторизацию@@', + 'Invalid two-factor code' => '@@Неверный код двухфакторной авторизации@@', 'Registration ip' => '@@IP при регистрации@@', 'Rule class can not be instantiated' => '@@Класс правила не может быть создан@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@Класс правила должен наследоваться от "yii\\rbac\\Rule"@@', + 'This will disable two-factor auth. Are you sure?' => '@@Вы уверены, что хотите отключить двухфакторную авторизацию?@@', + 'Two Factor Authentication' => '@@Двухфакторная авторизация@@', + '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)' => '(не задано)', - 'A confirmation message has been sent to your new email address' => 'На указаный email было отправлено письмо с дальнейшими инструкциями', + 'A confirmation message has been sent to your new email address' => 'На указанный адрес было отправлено письмо с дальнейшими инструкциями', + 'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.' => 'На вашу электронную почту было отправлено сообщение со ссылкой подтверждения регистрации.', 'A new confirmation link has been sent' => 'Ссылка для подтверждения была отправлена вам на почту', - 'A password will be generated automatically if not provided' => 'Если Вы не укажите пароль, он будет сгенерирован автоматически', + 'A password will be generated automatically if not provided' => 'Если Вы не укажете пароль, он будет сгенерирован автоматически', 'Account' => 'Аккаунт', 'Account confirmation' => 'Подтверждение аккаунта', 'Account details' => 'Детали аккаунта', @@ -94,7 +120,8 @@ return [ 'Are you sure you want to delete this user?' => 'Вы действительно хотите удалить этого пользователя?', 'Are you sure you want to switch to this user for the rest of this Session?' => 'Вы уверены, что хотите переключиться на этого пользователя до окончании текущей сессии?', 'Are you sure you want to unblock this user?' => 'Вы действительно хотите разблокировать этого пользователя?', - 'Are you sure? Deleted user can not be restored' => 'Вы уверены? Удаленный аккаунт не может быть восстановлен', + 'Are you sure you wish to send a password recovery email to this user?' => 'Вы уверены, что хотите отправить письмо с восстановлением пароля на почту этому пользователю?', + 'Are you sure? Deleted user can not be restored' => 'Вы уверены? Удалённый аккаунт невозможно будет восстановить', 'Are you sure? There is no going back' => 'Вы уверены? Это действие невозможно отменить', 'Assignments' => 'Назначения', 'Assignments have been updated' => 'Назначения были обновлены', @@ -106,13 +133,18 @@ return [ 'Authorization rule has been added.' => 'Правило авторизации добавлено.', 'Authorization rule has been removed.' => 'Правило авторизации удалено.', 'Authorization rule has been updated.' => 'Правило авторизации было обновлено.', + '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.' => 'Замечательно, почти готово. Вам осталось перейти по ссылке подтверждения, отправленной на старый адрес вашей электронной почты.', 'Bio' => 'О себе', 'Block' => 'Блокировка', 'Block status' => 'Статус блокировки', - 'Blocked at {0, date, MMMM dd, YYYY HH:mm}' => 'Заблокирован {0, date, MMMM dd, YYYY HH:mm}', + 'Blocked at {0, date, MMMM dd, YYYY HH:mm}' => 'Заблокирован {0, date, d MMMM YYYY в HH:mm}', + 'Cancel' => 'Отменить', + 'Cannot assign role "{0}" as the AuthManager is not configured on your console application.' => 'В вашем консольном приложении не настроен AuthManager, поэтому не удалось назначить роль "{0}".', 'Change your avatar at Gravatar.com' => 'Изменить аватар на сайте Gravatar.com', 'Children' => 'Дочерние элементы', 'Class' => 'Класс', + 'Close' => 'Закрыть', 'Complete password reset on {0}' => 'Смена пароля на сайте {0}', 'Confirm' => 'Подтвердить', 'Confirm account on {0}' => 'Активация аккаунта на сайте {0}', @@ -121,7 +153,7 @@ return [ 'Confirmation status' => 'Статус активации', 'Confirmation time' => 'Время активации', 'Confirmed' => 'Активирован', - 'Confirmed at {0, date, MMMM dd, YYYY HH:mm}' => 'Активирован {0, date, MMMM dd, YYYY HH:mm}', + 'Confirmed at {0, date, MMMM dd, YYYY HH:mm}' => 'Активирован {0, date, d MMMM YYYY в HH:mm}', 'Connect' => 'Подключить', 'Continue' => 'Продолжить', 'Create' => 'Создать', @@ -132,7 +164,7 @@ return [ 'Created at' => 'Дата создания', 'Credentials will be sent to the user by email' => 'Данные для входа будут отправлены пользователю на почту', 'Current password' => 'Текущий пароль', - 'Current password is not valid' => 'Текущий пароль введен неправильно', + 'Current password is not valid' => 'Текущий пароль введён неправильно', 'Delete' => 'Удалить', 'Delete account' => 'Удалить аккаунт', 'Description' => 'Описание', @@ -141,20 +173,23 @@ return [ 'Don\'t have an account? Sign up!' => 'Нет аккаунта? Зарегистрируйтесь!', 'Email' => 'Email', 'Email (public)' => 'Публичный email', + 'Enable' => 'Включить', 'Error occurred while changing password' => 'Произошла ошибка при смене пароля', 'Error occurred while confirming user' => 'Произошла ошибка при активации пользователя', 'Error occurred while deleting user' => 'Произошла ошибка при удалении пользователя', + 'Error sending registration message to "{email}". Please try again later.' => 'Ошибка при отправке письма о регистрации на "{email}". Пожалуйста, попробуйте позже.', + 'Error sending welcome message to "{email}". Please try again later.' => 'Ошибка при отправке приветственного письма на "{email}". Пожалуйста, попробуйте позже.', 'Finish' => 'Завершить', 'Forgot password?' => 'Забыли пароль?', 'Gravatar email' => 'Email для Gravatar', 'Hello' => 'Здравствуйте', 'If you already registered, sign in and connect this account on settings page' => 'Если вы уже зарегистрированы, войдите и подключите аккаунт в настройках', - 'If you cannot click the link, please try pasting the text into your browser' => 'Если вы не можете нажать на ссылку, скопируйте ее и вставьте в адресную строку вашего браузера', + 'If you cannot click the link, please try pasting the text into your browser' => 'Если вы не можете нажать на ссылку, скопируйте её и вставьте в адресную строку вашего браузера', 'If you did not make this request you can ignore this email' => 'Если вы получили это сообщение по ошибке, просто проигнорируйте или удалите его', 'Impersonate this user' => 'Переключиться на данного пользователя', - 'In order to complete your registration, please click the link below' => 'Чтобы активировать ваш аккаунт, пожалуйста, нажмите на ссылку ниже', + 'In order to complete your registration, please click the link below' => 'Чтобы активировать свой аккаунт, пожалуйста, нажмите на ссылку ниже', 'In order to complete your request, please click the link below' => 'Чтобы завершить запрос, нажмите на ссылку ниже', - 'In order to finish your registration, we need you to enter following fields' => 'Чтобы закончить регистрацию, вы должны заполнить следующие поля', + 'In order to finish your registration, we need you to enter following fields' => 'Чтобы закончить регистрацию, заполните следующие поля', 'Information' => 'Информация', 'Invalid login or password' => 'Неправильный логин или пароль', 'Invalid or expired link' => 'Ссылка неправильна или устарела', @@ -162,12 +197,14 @@ return [ 'It will be deleted forever' => 'Он будет удалён навсегда', 'Items' => 'Элементы', 'Joined on {0, date}' => 'Зарегистрирован {0, date}', + 'Last login' => 'Последний вход', 'Location' => 'Местоположение', 'Login' => 'Логин', 'Logout' => 'Выйти', 'Manage users' => 'Управление пользователями', 'Name' => 'Имя', 'Networks' => 'Соцсети', + 'Never' => 'Никогда', 'New email' => 'Новый адрес электронной почты', 'New password' => 'Новый пароль', 'New permission' => 'Новое разрешение', @@ -181,21 +218,24 @@ return [ 'Password has been changed' => 'Пароль был изменён', 'Permissions' => 'Разрешения', 'Please be certain' => 'Пожалуйста, будьте осторожны', - 'Please click the link below to complete your password reset' => 'Пожалуйста, нажмита на ссылку ниже, чтобы завершить процедуру сброса пароля', + 'Please click the link below to complete your password reset' => 'Пожалуйста, нажмите на ссылку ниже, чтобы завершить процедуру сброса пароля', 'Please fix following errors:' => 'Исправьте следующие ошибки:', 'Profile' => 'Профиль', 'Profile details' => 'Профиль', - 'Profile details have been updated' => 'Профиль пользователя был обновлен', + 'Profile details have been updated' => 'Профиль пользователя был обновлён', 'Profile settings' => 'Настройки профиля', 'Recover your password' => 'Восстановить пароль', - 'Recovery link is invalid or expired. Please try requesting a new one.' => 'Ссылка для смены пароля неправильна или устарела. Пожалуйста, попробуйте запросить новую ссылку.', + 'Recovery link is invalid or expired. Please try requesting a new one.' => 'Ссылка для смены пароля неправильна или устарела. Вы можете запросить новую.', 'Recovery message sent' => 'Письмо для сброса пароля было отправлено', 'Registration IP' => 'IP при регистрации', 'Registration on this website is disabled' => 'Регистрация на сайте отключена', 'Registration time' => 'Время регистрации', - 'Remember me next time' => 'Запопомнить меня', + 'Remember me next time' => 'Запомнить меня', 'Request new confirmation message' => 'Запросить новое подтверждающее письмо', + 'Required "key" cannot be empty.' => 'Поле "key" не может быть пустым.', + 'Required "secret" cannot be empty.' => 'Поле "secret" не может быть пустым.', 'Reset your password' => 'Сбросить пароль', + 'Role "{0}" not found. Creating it.' => 'Роль "{0}" не найдена. Создаём её.', 'Roles' => 'Роли', 'Rule' => 'Правило', 'Rule class must extend "yii\\rbac\\Rule".' => 'Класс с правилами должен наследовать "yii\\rbac\\Rule".', @@ -205,26 +245,31 @@ return [ 'Rule {0} not found.' => 'Правило {0} не найдено.', 'Rules' => 'Правила', 'Save' => 'Сохранить', + 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => 'Просканируйте QR-код приложением Google Authenticator App, затем вставьте временный код в поле и отправьте.', + 'Send password recovery email' => 'Отправить письмо с восстановлением пароля', 'Sign in' => 'Войти', 'Sign up' => 'Зарегистрироваться', 'Something went wrong' => 'Что-то пошло не так', 'Switch identities is disabled.' => 'Переключение на другой аккаунт отключено.', 'Thank you for signing up on {0}' => 'Спасибо за регистрацию на сайте {0}', 'Thank you, registration is now complete.' => 'Поздравляем, регистрация успешно завершена!', + 'The "recaptcha" component must be configured.' => 'Необходимо настроить компонент "recaptcha"', 'The confirmation link is invalid or expired. Please try requesting a new one.' => 'Ссылка для активации аккаунта неправильна или устарела. Вы можете запросить новую.', - 'There is neither role nor permission with name "{0}"' => 'Нет ни роли ни разрешения с именем "{0}"', - 'This account has already been connected to another user' => 'Этот аккаунт уже был привязан к другой учетной записи', + 'The verification code is incorrect.' => 'Неправильный код подтверждения.', + 'There is neither role nor permission with name "{0}"' => 'Нет ни роли, ни разрешения с именем "{0}"', + 'This account has already been connected to another user' => 'Этот аккаунт уже привязан к другой учетной записи', 'This email address has already been taken' => 'Email уже используется', 'This username has already been taken' => 'Это имя пользователя уже используется', 'Time zone' => 'Часовой пояс', 'Time zone is not valid' => 'Некорректный часовой пояс', - 'Unable to confirm user. Please, try again.' => 'Не удалось активировать пользователя. Пожалуйста, попробуйте еще раз.', + 'Unable to confirm user. Please, try again.' => 'Не удалось активировать пользователя. Пожалуйста, попробуйте ещё раз.', 'Unable to create an account.' => 'Не удалось создать аккаунт.', 'Unable to create authorization item.' => 'Не удалось создать элемент авторизации', 'Unable to create new authorization rule.' => 'Не удалось создать правило авторизации.', 'Unable to delete user. Please, try again later.' => 'Не удалось удалить пользователя. Пожалуйста, попробуйте позже.', 'Unable to remove authorization item.' => 'Не удалось удалить элемент авторизации.', 'Unable to send confirmation link' => 'Не удалось отправить ссылку для активации аккаунта.', + 'Unable to send recovery message to the user' => 'Не удалось отправить пользователю письмо восстановления', 'Unable to update authorization item.' => 'Не удалось изменить элемент авторизации.', 'Unable to update authorization rule.' => 'Не удалось изменить правило авторизации.', 'Unable to update block status.' => 'Не удалось изменить статус блокировки.', @@ -237,17 +282,23 @@ return [ 'Update rule' => 'Изменить правило', 'Update user account' => 'Обновить аккаунт пользователя', 'Updated at' => 'Дата редактирования', - 'User block status has been updated.' => 'Статус блокировки пользователя обновлен.', + 'User account could not be created.' => 'Не удалось создать аккаунт для пользователя.', + 'User block status has been updated.' => 'Статус блокировки пользователя обновлён.', + 'User could not be registered.' => 'Не удалось зарегистрировать пользователя.', 'User has been confirmed' => 'Пользователь был активирован', 'User has been created' => 'Пользователь был создан', - 'User has been deleted' => 'Пользователь был удален', + 'User has been deleted' => 'Пользователь был удалён', 'User is not found' => 'Пользователь не найден', + 'User not found.' => 'Пользователь не найден.', 'Username' => 'Имя пользователя', 'Users' => 'Пользователи', 'VKontakte' => 'ВКонтакте', + 'Verification failed. Please, enter new code.' => 'Проверка не удалась. Пожауйста, введите новый код', + 'We couldn\'t re-send the mail to confirm your address. Please, verify is the correct email or if it has been confirmed already.' => 'Не удалось повторно отправить письмо для подтверждения вашего адреса электронной почты. Пожалуйста, проверьте, что ввели корректный адрес или что он ещё не был подтверждён.', 'We have generated a password for you' => 'Мы сгенерировали новый пароль для вас', 'We have received a request to change the email address for your account on {0}' => 'Мы получили запрос на смену адреса электронной почты для вашего аккаунта на {0}', 'We have received a request to reset the password for your account on {0}' => 'Мы получили запрос на сброс пароля для вашего аккаунта на {0}', + 'We have sent confirmation links to both old and new email addresses. You must click both links to complete your request.' => 'Мы отправили письма на ваш старый и новый адреса. Вы должны перейти по обеим ссылкам, чтобы завершить процесс смены адреса.', 'Website' => 'Веб-сайт', 'Welcome to {0}' => 'Добро пожаловать на {0}', 'Yandex' => 'Яндекс', @@ -255,16 +306,17 @@ return [ 'You can connect multiple accounts to be able to log in using them' => 'Вы можете подключить несколько аккаунтов, чтобы использовать их для входа', 'You cannot remove your own account' => 'Вы не можете удалить свой аккаунт', 'You need to confirm your email address' => 'Вам нужно подтвердить ваш адрес электронной почты', - 'Your account details have been updated' => 'Настройки аккаунта были изменен', + 'Your account details have been updated' => 'Настройки аккаунта были изменены', 'Your account has been blocked' => 'Ваш аккаунт заблокирован', 'Your account has been blocked.' => 'Ваш аккаунт заблокирован.', 'Your account has been completely deleted' => 'Ваш аккаунт был полностью удалён', - 'Your account has been connected' => 'Аккаунт был успешно подключен', + 'Your account has been connected' => 'Аккаунт был успешно подключён', 'Your account has been created' => 'Ваш аккаунт был создан', - 'Your account has been created and a message with further instructions has been sent to your email' => 'Ваш аккаунт был создан и сообщение с дальнейшими инструкциями отправлено на ваш email', + 'Your account has been created and a message with further instructions has been sent to your email' => 'Ваш аккаунт успешно создан, сообщение с дальнейшими инструкциями отправлено на ваш адрес электронной почты', 'Your account on {0} has been created' => 'Ваш аккаунт на сайте "{0}" был успешно создан', 'Your confirmation token is invalid or expired' => 'Ваша ссылка устарела или является ошибочной', - 'Your email address has been changed' => 'Ваш email был успешно изменен', + 'Your email address has been changed' => 'Ваш email был успешно изменён', 'Your profile has been updated' => 'Настройки профиля были успешно сохранены', - '{0, date, MMMM dd, YYYY HH:mm}' => '{0, date, MMMM dd, YYYY HH:mm}', + '{0, date, MMMM dd, YYYY HH:mm}' => '{0, date, d MMMM YYYY в HH:mm}', + '{0} cannot be blank.' => '{0} не может быть пустым.', ]; diff --git a/src/User/resources/i18n/th/usuario.php b/src/User/resources/i18n/th/usuario.php index 5b39d05..89759e9 100644 --- a/src/User/resources/i18n/th/usuario.php +++ b/src/User/resources/i18n/th/usuario.php @@ -35,6 +35,7 @@ return [ 'Are you sure you want to delete this user?' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you want to unblock this user?' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', 'Are you sure? Deleted user can not be restored' => '', 'Are you sure? There is no going back' => '', 'Assignments' => '', @@ -88,18 +89,20 @@ return [ 'Deleted by GDPR request' => '', 'Description' => '', 'Didn\'t receive confirmation message?' => '', - 'Disable Two-Factor Auth' => '', + 'Disable two factor authentication' => '', 'Disconnect' => '', 'Don\'t have an account? Sign up!' => '', 'Download my data' => '', 'Email' => '', 'Email (public)' => '', 'Enable' => '', - 'Enable Two-factor auth' => '', + 'Enable two factor authentication' => '', 'Error occurred while changing password' => '', 'Error occurred while confirming user' => '', 'Error occurred while deleting user' => '', 'Export my data' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -118,6 +121,7 @@ return [ 'Invalid or expired link' => '', 'Invalid password' => '', 'Invalid two-factor code' => '', + 'Invalid two factor authentication code' => '', 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', @@ -174,6 +178,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', 'Something went wrong' => '', @@ -189,23 +194,23 @@ return [ 'This username has already been taken' => '', 'This will disable two-factor auth. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', + 'This will disable two factor authentication. Are you sure?' => '', 'Time zone' => '', 'Time zone is not valid' => '', - 'Two Factor Authentication' => '', - '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' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', 'Unable to confirm user. Please, try again.' => '', 'Unable to create an account.' => '', 'Unable to create authorization item.' => '', 'Unable to create new authorization rule.' => '', 'Unable to delete user. Please, try again later.' => '', - 'Unable to disable two-factor authorization.' => '', + 'Unable to disable Two factor authentication.' => '', 'Unable to remove authorization item.' => '', 'Unable to send confirmation link' => '', + 'Unable to send recovery message to the user' => '', 'Unable to update authorization item.' => '', 'Unable to update authorization rule.' => '', 'Unable to update block status.' => '', @@ -218,7 +223,9 @@ return [ 'Update rule' => '', 'Update user account' => '', 'Updated at' => '', + 'User account could not be created.' => '', 'User block status has been updated.' => '', + 'User could not be registered.' => '', 'User has been confirmed' => '', 'User has been created' => '', 'User has been deleted' => '', @@ -262,9 +269,19 @@ return [ 'Class "{0}" does not exist' => '@@@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', 'Registration ip' => '@@@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@@@', ]; diff --git a/src/User/resources/i18n/tr_TR/usuario.php b/src/User/resources/i18n/tr-TR/usuario.php similarity index 85% rename from src/User/resources/i18n/tr_TR/usuario.php rename to src/User/resources/i18n/tr-TR/usuario.php index 5b39d05..9236ca5 100644 --- a/src/User/resources/i18n/tr_TR/usuario.php +++ b/src/User/resources/i18n/tr-TR/usuario.php @@ -35,6 +35,7 @@ return [ 'Are you sure you want to delete this user?' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you want to unblock this user?' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', 'Are you sure? Deleted user can not be restored' => '', 'Are you sure? There is no going back' => '', 'Assignments' => '', @@ -88,18 +89,22 @@ return [ 'Deleted by GDPR request' => '', 'Description' => '', 'Didn\'t receive confirmation message?' => '', - 'Disable Two-Factor Auth' => '', + 'Disable two factor authentication' => '', 'Disconnect' => '', 'Don\'t have an account? Sign up!' => '', 'Download my data' => '', 'Email' => '', 'Email (public)' => '', 'Enable' => '', - 'Enable Two-factor auth' => '', + 'Enable two factor authentication' => '', 'Error occurred while changing password' => '', 'Error occurred while confirming user' => '', 'Error occurred while deleting user' => '', +<<<<<<< HEAD:src/User/resources/i18n/tr_TR/usuario.php 'Export my data' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', +>>>>>>> upstream/master:src/User/resources/i18n/tr-TR/usuario.php 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -116,8 +121,11 @@ return [ 'Information' => '', 'Invalid login or password' => '', 'Invalid or expired link' => '', +<<<<<<< HEAD:src/User/resources/i18n/tr_TR/usuario.php 'Invalid password' => '', 'Invalid two-factor code' => '', + 'Invalid two factor authentication code' => '', +>>>>>>> upstream/master:src/User/resources/i18n/tr-TR/usuario.php 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', @@ -174,6 +182,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', 'Something went wrong' => '', @@ -187,25 +196,27 @@ return [ 'This account has already been connected to another user' => '', 'This email address has already been taken' => '', 'This username has already been taken' => '', +<<<<<<< HEAD:src/User/resources/i18n/tr_TR/usuario.php 'This will disable two-factor auth. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', + 'This will disable two factor authentication. Are you sure?' => '', +>>>>>>> upstream/master:src/User/resources/i18n/tr-TR/usuario.php 'Time zone' => '', 'Time zone is not valid' => '', - 'Two Factor Authentication' => '', - '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' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', 'Unable to confirm user. Please, try again.' => '', 'Unable to create an account.' => '', 'Unable to create authorization item.' => '', 'Unable to create new authorization rule.' => '', 'Unable to delete user. Please, try again later.' => '', - 'Unable to disable two-factor authorization.' => '', + 'Unable to disable Two factor authentication.' => '', 'Unable to remove authorization item.' => '', 'Unable to send confirmation link' => '', + 'Unable to send recovery message to the user' => '', 'Unable to update authorization item.' => '', 'Unable to update authorization rule.' => '', 'Unable to update block status.' => '', @@ -218,7 +229,9 @@ return [ 'Update rule' => '', 'Update user account' => '', 'Updated at' => '', + 'User account could not be created.' => '', 'User block status has been updated.' => '', + 'User could not be registered.' => '', 'User has been confirmed' => '', 'User has been created' => '', 'User has been deleted' => '', @@ -260,11 +273,23 @@ return [ 'A message has been sent to your email address. ' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', +<<<<<<< HEAD:src/User/resources/i18n/tr_TR/usuario.php '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', +>>>>>>> upstream/master:src/User/resources/i18n/tr-TR/usuario.php 'Registration ip' => '@@@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@@@', ]; diff --git a/src/User/resources/i18n/uk/usuario.php b/src/User/resources/i18n/uk/usuario.php index 5b39d05..89759e9 100644 --- a/src/User/resources/i18n/uk/usuario.php +++ b/src/User/resources/i18n/uk/usuario.php @@ -35,6 +35,7 @@ return [ 'Are you sure you want to delete this user?' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you want to unblock this user?' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', 'Are you sure? Deleted user can not be restored' => '', 'Are you sure? There is no going back' => '', 'Assignments' => '', @@ -88,18 +89,20 @@ return [ 'Deleted by GDPR request' => '', 'Description' => '', 'Didn\'t receive confirmation message?' => '', - 'Disable Two-Factor Auth' => '', + 'Disable two factor authentication' => '', 'Disconnect' => '', 'Don\'t have an account? Sign up!' => '', 'Download my data' => '', 'Email' => '', 'Email (public)' => '', 'Enable' => '', - 'Enable Two-factor auth' => '', + 'Enable two factor authentication' => '', 'Error occurred while changing password' => '', 'Error occurred while confirming user' => '', 'Error occurred while deleting user' => '', 'Export my data' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -118,6 +121,7 @@ return [ 'Invalid or expired link' => '', 'Invalid password' => '', 'Invalid two-factor code' => '', + 'Invalid two factor authentication code' => '', 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', @@ -174,6 +178,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', 'Something went wrong' => '', @@ -189,23 +194,23 @@ return [ 'This username has already been taken' => '', 'This will disable two-factor auth. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', + 'This will disable two factor authentication. Are you sure?' => '', 'Time zone' => '', 'Time zone is not valid' => '', - 'Two Factor Authentication' => '', - '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' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', 'Unable to confirm user. Please, try again.' => '', 'Unable to create an account.' => '', 'Unable to create authorization item.' => '', 'Unable to create new authorization rule.' => '', 'Unable to delete user. Please, try again later.' => '', - 'Unable to disable two-factor authorization.' => '', + 'Unable to disable Two factor authentication.' => '', 'Unable to remove authorization item.' => '', 'Unable to send confirmation link' => '', + 'Unable to send recovery message to the user' => '', 'Unable to update authorization item.' => '', 'Unable to update authorization rule.' => '', 'Unable to update block status.' => '', @@ -218,7 +223,9 @@ return [ 'Update rule' => '', 'Update user account' => '', 'Updated at' => '', + 'User account could not be created.' => '', 'User block status has been updated.' => '', + 'User could not be registered.' => '', 'User has been confirmed' => '', 'User has been created' => '', 'User has been deleted' => '', @@ -262,9 +269,19 @@ return [ 'Class "{0}" does not exist' => '@@@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', 'Registration ip' => '@@@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@@@', ]; diff --git a/src/User/resources/i18n/vi/usuario.php b/src/User/resources/i18n/vi/usuario.php index 5b39d05..89759e9 100644 --- a/src/User/resources/i18n/vi/usuario.php +++ b/src/User/resources/i18n/vi/usuario.php @@ -35,6 +35,7 @@ return [ 'Are you sure you want to delete this user?' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you want to unblock this user?' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', 'Are you sure? Deleted user can not be restored' => '', 'Are you sure? There is no going back' => '', 'Assignments' => '', @@ -88,18 +89,20 @@ return [ 'Deleted by GDPR request' => '', 'Description' => '', 'Didn\'t receive confirmation message?' => '', - 'Disable Two-Factor Auth' => '', + 'Disable two factor authentication' => '', 'Disconnect' => '', 'Don\'t have an account? Sign up!' => '', 'Download my data' => '', 'Email' => '', 'Email (public)' => '', 'Enable' => '', - 'Enable Two-factor auth' => '', + 'Enable two factor authentication' => '', 'Error occurred while changing password' => '', 'Error occurred while confirming user' => '', 'Error occurred while deleting user' => '', 'Export my data' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -118,6 +121,7 @@ return [ 'Invalid or expired link' => '', 'Invalid password' => '', 'Invalid two-factor code' => '', + 'Invalid two factor authentication code' => '', 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', @@ -174,6 +178,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', 'Something went wrong' => '', @@ -189,23 +194,23 @@ return [ 'This username has already been taken' => '', 'This will disable two-factor auth. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', + 'This will disable two factor authentication. Are you sure?' => '', 'Time zone' => '', 'Time zone is not valid' => '', - 'Two Factor Authentication' => '', - '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' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', 'Unable to confirm user. Please, try again.' => '', 'Unable to create an account.' => '', 'Unable to create authorization item.' => '', 'Unable to create new authorization rule.' => '', 'Unable to delete user. Please, try again later.' => '', - 'Unable to disable two-factor authorization.' => '', + 'Unable to disable Two factor authentication.' => '', 'Unable to remove authorization item.' => '', 'Unable to send confirmation link' => '', + 'Unable to send recovery message to the user' => '', 'Unable to update authorization item.' => '', 'Unable to update authorization rule.' => '', 'Unable to update block status.' => '', @@ -218,7 +223,9 @@ return [ 'Update rule' => '', 'Update user account' => '', 'Updated at' => '', + 'User account could not be created.' => '', 'User block status has been updated.' => '', + 'User could not be registered.' => '', 'User has been confirmed' => '', 'User has been created' => '', 'User has been deleted' => '', @@ -262,9 +269,19 @@ return [ 'Class "{0}" does not exist' => '@@@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', 'Registration ip' => '@@@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@@@', ]; diff --git a/src/User/resources/i18n/zh-CN/usuario.php b/src/User/resources/i18n/zh-CN/usuario.php index 5b39d05..89759e9 100644 --- a/src/User/resources/i18n/zh-CN/usuario.php +++ b/src/User/resources/i18n/zh-CN/usuario.php @@ -35,6 +35,7 @@ return [ 'Are you sure you want to delete this user?' => '', 'Are you sure you want to switch to this user for the rest of this Session?' => '', 'Are you sure you want to unblock this user?' => '', + 'Are you sure you wish to send a password recovery email to this user?' => '', 'Are you sure? Deleted user can not be restored' => '', 'Are you sure? There is no going back' => '', 'Assignments' => '', @@ -88,18 +89,20 @@ return [ 'Deleted by GDPR request' => '', 'Description' => '', 'Didn\'t receive confirmation message?' => '', - 'Disable Two-Factor Auth' => '', + 'Disable two factor authentication' => '', 'Disconnect' => '', 'Don\'t have an account? Sign up!' => '', 'Download my data' => '', 'Email' => '', 'Email (public)' => '', 'Enable' => '', - 'Enable Two-factor auth' => '', + 'Enable two factor authentication' => '', 'Error occurred while changing password' => '', 'Error occurred while confirming user' => '', 'Error occurred while deleting user' => '', 'Export my data' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -118,6 +121,7 @@ return [ 'Invalid or expired link' => '', 'Invalid password' => '', 'Invalid two-factor code' => '', + 'Invalid two factor authentication code' => '', 'Invalid value' => '', 'It will be deleted forever' => '', 'Items' => '', @@ -174,6 +178,7 @@ return [ 'Rules' => '', 'Save' => '', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => '', + 'Send password recovery email' => '', 'Sign in' => '', 'Sign up' => '', 'Something went wrong' => '', @@ -189,23 +194,23 @@ return [ 'This username has already been taken' => '', 'This will disable two-factor auth. Are you sure?' => '', 'This will remove your personal data from this site. You will no longer be able to sign in.' => '', + 'This will disable two factor authentication. Are you sure?' => '', 'Time zone' => '', 'Time zone is not valid' => '', - 'Two Factor Authentication' => '', - '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' => '', + 'Two Factor Authentication (2FA)' => '', + 'Two factor authentication code' => '', + 'Two factor authentication has been disabled.' => '', + 'Two factor authentication protects you against stolen credentials' => '', + 'Two factor authentication successfully enabled.' => '', 'Unable to confirm user. Please, try again.' => '', 'Unable to create an account.' => '', 'Unable to create authorization item.' => '', 'Unable to create new authorization rule.' => '', 'Unable to delete user. Please, try again later.' => '', - 'Unable to disable two-factor authorization.' => '', + 'Unable to disable Two factor authentication.' => '', 'Unable to remove authorization item.' => '', 'Unable to send confirmation link' => '', + 'Unable to send recovery message to the user' => '', 'Unable to update authorization item.' => '', 'Unable to update authorization rule.' => '', 'Unable to update block status.' => '', @@ -218,7 +223,9 @@ return [ 'Update rule' => '', 'Update user account' => '', 'Updated at' => '', + 'User account could not be created.' => '', 'User block status has been updated.' => '', + 'User could not be registered.' => '', 'User has been confirmed' => '', 'User has been created' => '', 'User has been deleted' => '', @@ -262,9 +269,19 @@ return [ 'Class "{0}" does not exist' => '@@@@', '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}' => '@@@@', + 'Disable Two-Factor Auth' => '@@@@', + 'Enable Two-factor auth' => '@@@@', 'Registration ip' => '@@@@', 'Rule class can not be instantiated' => '@@@@', 'Rule class must extend "yii\\rbac\\Rule"' => '@@@@', + 'Two Factor Authentication' => '@@@@', + '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. ' => '@@@@', ]; diff --git a/src/User/resources/views/admin/_account.php b/src/User/resources/views/admin/_account.php index 0d456db..db1d14a 100644 --- a/src/User/resources/views/admin/_account.php +++ b/src/User/resources/views/admin/_account.php @@ -32,7 +32,7 @@ use yii\helpers\Html; ] ); ?> -render('_user', ['form' => $form, 'user' => $user]) ?> +render('/admin/_user', ['form' => $form, 'user' => $user]) ?>
diff --git a/src/User/resources/views/admin/create.php b/src/User/resources/views/admin/create.php index db9040c..f65d7de 100644 --- a/src/User/resources/views/admin/create.php +++ b/src/User/resources/views/admin/create.php @@ -96,7 +96,7 @@ $this->params['breadcrumbs'][] = $this->title; ] ); ?> - render('_user', ['form' => $form, 'user' => $user]) ?> + render('/admin/_user', ['form' => $form, 'user' => $user]) ?>
diff --git a/src/User/resources/views/admin/index.php b/src/User/resources/views/admin/index.php index 97cee7c..c9a9e46 100644 --- a/src/User/resources/views/admin/index.php +++ b/src/User/resources/views/admin/index.php @@ -52,7 +52,7 @@ $module = Yii::$app->getModule('user'); 'attribute' => 'created_at', 'value' => function ($model) { if (extension_loaded('intl')) { - return Yii::t('usuario', '{0, date, MMMM dd, YYYY HH:mm}', [$model->created_at]); + return Yii::t('usuario', '{0, date, MMM dd, YYYY HH:mm}', [$model->created_at]); } return date('Y-m-d G:i:s', $model->created_at); @@ -64,12 +64,21 @@ $module = Yii::$app->getModule('user'); if (!$model->last_login_at || $model->last_login_at == 0) { return Yii::t('usuario', 'Never'); } elseif (extension_loaded('intl')) { - return Yii::t('usuario', '{0, date, MMMM dd, YYYY HH:mm}', [$model->last_login_at]); + return Yii::t('usuario', '{0, date, MMM dd, YYYY HH:mm}', [$model->last_login_at]); } else { return date('Y-m-d G:i:s', $model->last_login_at); } }, ], + [ + 'attribute' => 'last_login_ip', + 'value' => function ($model) { + return $model->last_login_ip == null + ? '' . Yii::t('usuario', '(not set)') . '' + : $model->last_login_ip; + }, + 'format' => 'html', + ], [ 'header' => Yii::t('usuario', 'Confirmation'), 'value' => function ($model) { @@ -92,6 +101,7 @@ $module = Yii::$app->getModule('user'); 'format' => 'raw', 'visible' => Yii::$app->getModule('user')->enableEmailConfirmation, ], + 'password_age', [ 'header' => Yii::t('usuario', 'Block status'), 'value' => function ($model) { @@ -121,7 +131,7 @@ $module = Yii::$app->getModule('user'); ], [ 'class' => 'yii\grid\ActionColumn', - 'template' => '{switch} {update} {delete}', + 'template' => '{switch} {reset} {force-password-change} {update} {delete}', 'buttons' => [ 'switch' => function ($url, $model) use ($module) { if ($model->id != Yii::$app->user->id && $module->enableSwitchIdentities) { @@ -140,7 +150,42 @@ $module = Yii::$app->getModule('user'); } return null; - } + }, + 'reset' => function ($url, $model) use ($module) { + if(!$module->allowPasswordRecovery && $module->allowAdminPasswordRecovery) { + return Html::a( + '', + ['/user/admin/password-reset', 'id' => $model->id], + [ + 'title' => Yii::t('usuario', 'Send password recovery email'), + 'data-confirm' => Yii::t( + 'usuario', + 'Are you sure you wish to send a password recovery email to this user?' + ), + 'data-method' => 'POST', + ] + ); + } + + return null; + }, + 'force-password-change' => function ($url, $model) use ($module) { + if (is_null($module->maxPasswordAge)) { + return null; + } + return Html::a( + '', + ['/user/admin/force-password-change', 'id' => $model->id], + [ + 'title' => Yii::t('usuario', 'Force password change at next login'), + 'data-confirm' => Yii::t( + 'usuario', + 'Are you sure you wish the user to change their password at next login?' + ), + 'data-method' => 'POST', + ] + ); + }, ] ], ], diff --git a/src/User/resources/views/permission/create.php b/src/User/resources/views/permission/create.php index 1e77b26..90ef9e4 100644 --- a/src/User/resources/views/permission/create.php +++ b/src/User/resources/views/permission/create.php @@ -23,7 +23,7 @@ $this->params['breadcrumbs'][] = $this->title; beginContent('@Da/User/resources/views/shared/admin_layout.php') ?> render( - '_form', + '/permission/_form', [ 'model' => $model, 'unassignedItems' => $unassignedItems, diff --git a/src/User/resources/views/permission/update.php b/src/User/resources/views/permission/update.php index 70097df..a553acb 100644 --- a/src/User/resources/views/permission/update.php +++ b/src/User/resources/views/permission/update.php @@ -23,7 +23,7 @@ $this->params['breadcrumbs'][] = $this->title; beginContent('@Da/User/resources/views/shared/admin_layout.php') ?> render( - '_form', + '/permission/_form', [ 'model' => $model, 'unassignedItems' => $unassignedItems, diff --git a/src/User/resources/views/registration/register.php b/src/User/resources/views/registration/register.php index bb5a02f..243977a 100644 --- a/src/User/resources/views/registration/register.php +++ b/src/User/resources/views/registration/register.php @@ -37,7 +37,7 @@ $this->params['breadcrumbs'][] = $this->title; ] ); ?> - field($model, 'email') ?> + field($model, 'email')->textInput(['autofocus' => true]) ?> field($model, 'username') ?> diff --git a/src/User/resources/views/role/create.php b/src/User/resources/views/role/create.php index dea05b8..3176627 100644 --- a/src/User/resources/views/role/create.php +++ b/src/User/resources/views/role/create.php @@ -22,7 +22,7 @@ $this->params['breadcrumbs'][] = $this->title; beginContent('@Da/User/resources/views/shared/admin_layout.php') ?> render( - '_form', + '/role/_form', [ 'model' => $model, 'unassignedItems' => $unassignedItems, diff --git a/src/User/resources/views/role/update.php b/src/User/resources/views/role/update.php index 0759dfd..b9ccc34 100644 --- a/src/User/resources/views/role/update.php +++ b/src/User/resources/views/role/update.php @@ -22,7 +22,7 @@ $this->params['breadcrumbs'][] = $this->title; beginContent('@Da/User/resources/views/shared/admin_layout.php') ?> render( - '_form', + '/role/_form', [ 'model' => $model, 'unassignedItems' => $unassignedItems, diff --git a/src/User/resources/views/rule/create.php b/src/User/resources/views/rule/create.php index 386a9c0..c2b8a54 100644 --- a/src/User/resources/views/rule/create.php +++ b/src/User/resources/views/rule/create.php @@ -22,7 +22,7 @@ $this->params['breadcrumbs'][] = $this->title; beginContent('@Da/User/resources/views/shared/admin_layout.php') ?> render( - '_form', + '/rule/_form', [ 'model' => $model, ] diff --git a/src/User/resources/views/rule/update.php b/src/User/resources/views/rule/update.php index df4fce4..f12495e 100644 --- a/src/User/resources/views/rule/update.php +++ b/src/User/resources/views/rule/update.php @@ -23,7 +23,7 @@ $this->params['breadcrumbs'][] = $this->title; beginContent('@Da/User/resources/views/shared/admin_layout.php') ?> render( - '_form', + '/rule/_form', [ 'model' => $model, ] diff --git a/src/User/resources/views/settings/account.php b/src/User/resources/views/settings/account.php index df29662..3b54bb3 100644 --- a/src/User/resources/views/settings/account.php +++ b/src/User/resources/views/settings/account.php @@ -31,7 +31,7 @@ $module = Yii::$app->getModule('user');
- render('_menu') ?> + render('/settings/_menu') ?>
@@ -81,7 +81,7 @@ $module = Yii::$app->getModule('user'); +
-

+

- . + .

$model->getUser()->id], [ 'id' => 'disable_tf_btn', 'class' => 'btn btn-warning ' . ($model->getUser()->auth_tf_enabled ? '' : 'hide'), 'data-method' => 'post', - 'data-confirm' => Yii::t('usuario', 'This will disable two-factor auth. Are you sure?'), + 'data-confirm' => Yii::t('usuario', 'This will disable two factor authentication. Are you sure?'), ] ) ?> 'enable_tf_btn', diff --git a/src/User/resources/views/settings/networks.php b/src/User/resources/views/settings/networks.php index f7c6883..3c62583 100644 --- a/src/User/resources/views/settings/networks.php +++ b/src/User/resources/views/settings/networks.php @@ -28,7 +28,7 @@ $this->params['breadcrumbs'][] = $this->title;
- render('_menu') ?> + render('/networks/_menu') ?>
diff --git a/src/User/resources/views/settings/profile.php b/src/User/resources/views/settings/profile.php index 1144909..8f33786 100644 --- a/src/User/resources/views/settings/profile.php +++ b/src/User/resources/views/settings/profile.php @@ -32,7 +32,7 @@ $timezoneHelper = $model->make(TimezoneHelper::class);
- render('_menu') ?> + render('/profile/_menu') ?>
@@ -71,7 +71,8 @@ $timezoneHelper = $model->make(TimezoneHelper::class); ->hint( Html::a( Yii::t('usuario', 'Change your avatar at Gravatar.com'), - 'http://gravatar.com' + 'http://gravatar.com', + ['target' => '_blank'] ) ) ?> diff --git a/src/User/resources/views/settings/two-factor.php b/src/User/resources/views/settings/two-factor.php index d4d5527..6434396 100644 --- a/src/User/resources/views/settings/two-factor.php +++ b/src/User/resources/views/settings/two-factor.php @@ -29,7 +29,7 @@
- +
- render('_menu') ?> + render('/shared/_menu') ?>
diff --git a/src/User/resources/views/shared/message.php b/src/User/resources/views/shared/message.php index a35d8f6..84574e0 100644 --- a/src/User/resources/views/shared/message.php +++ b/src/User/resources/views/shared/message.php @@ -20,7 +20,7 @@ $this->title = $title; ?> render( - '_alert', + '/shared/_alert', [ 'module' => $module, ] diff --git a/src/User/resources/views/widgets/login/login.php b/src/User/resources/views/widgets/login/form.php similarity index 100% rename from src/User/resources/views/widgets/login/login.php rename to src/User/resources/views/widgets/login/form.php diff --git a/tests/_data/schema.sql b/tests/_data/schema.sql index eb32a92..cd9c92a 100644 --- a/tests/_data/schema.sql +++ b/tests/_data/schema.sql @@ -76,6 +76,8 @@ CREATE TABLE `user` ( `gdpr_consent` tinyint(1) NULL DEFAULT '0', `gdpr_consent_date` int(11) NULL, `gdpr_deleted` tinyint(1) DEFAULT '0', + `last_login_ip` varchar(45) DEFAULT NULL, + `password_changed_at` int(11) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `user_unique_email` (`email`), diff --git a/tests/functional/RegistrationCest.php b/tests/functional/RegistrationCest.php index d496dbe..dfc19cf 100644 --- a/tests/functional/RegistrationCest.php +++ b/tests/functional/RegistrationCest.php @@ -50,7 +50,7 @@ class RegistrationCest $I->see(Html::encode('This email address has already been taken')); $this->register($I, 'tester@example.com', 'tester', 'tester'); - $I->see('Your account has been created and a message with further instructions has been sent to your email'); + $I->see('Your account has been created'); $user = $I->grabRecord(User::className(), ['email' => 'tester@example.com']); $I->assertTrue($user->isConfirmed); @@ -96,7 +96,7 @@ class RegistrationCest ]); $I->amOnRoute('/user/registration/register'); $this->register($I, 'tester@example.com', 'tester'); - $I->see('Your account has been created and a message with further instructions has been sent to your email'); + $I->see('Your account has been created'); $user = $I->grabRecord(User::className(), ['email' => 'tester@example.com']); $I->assertEquals('tester', $user->username); /** @var yii\swiftmailer\Message $message */