diff --git a/CHANGELOG.md b/CHANGELOG.md index fe940d2..106b506 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - Fix #258: Rename `GDPR` delete action to `lowerCamelCase`/`dash` style (bscheshirwork) - Fix #271: Add closure support for `from` email address; Change default sender to `supportEmail` (bscheshirwork) - Fix #276: Fix missing translatable strings + - Enh #249: Show message `email send if possible` any time on reset password request (bscheshirwork) ## 1.1.4 - February 19, 2018 - Enh: Check enableEmailConfirmation on registration (faenir) diff --git a/src/User/Controller/RecoveryController.php b/src/User/Controller/RecoveryController.php index 33c19ee..a935669 100644 --- a/src/User/Controller/RecoveryController.php +++ b/src/User/Controller/RecoveryController.php @@ -104,15 +104,15 @@ class RecoveryController extends Controller if ($this->make(PasswordRecoveryService::class, [$form->email, $mailService])->run()) { $this->trigger(FormEvent::EVENT_AFTER_REQUEST, $event); - - return $this->render( - '/shared/message', - [ - 'title' => Yii::t('usuario', 'Recovery message sent'), - 'module' => $this->module, - ] - ); } + + return $this->render( + '/shared/message', + [ + 'title' => Yii::t('usuario', 'Recovery message sent'), + 'module' => $this->module, + ] + ); } return $this->render('request', ['model' => $form]); diff --git a/src/User/Service/PasswordRecoveryService.php b/src/User/Service/PasswordRecoveryService.php index 032257e..9d6e2db 100644 --- a/src/User/Service/PasswordRecoveryService.php +++ b/src/User/Service/PasswordRecoveryService.php @@ -41,6 +41,13 @@ class PasswordRecoveryService implements ServiceInterface public function run() { try { + if ($this->getModule()->enableFlashMessages == true) { + Yii::$app->session->setFlash( + 'info', + Yii::t('usuario', 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.', ['email' => $this->email, 'appName' => Yii::$app->name]) + ); + } + /** @var User $user */ $user = $this->query->whereEmail($this->email)->one(); @@ -60,13 +67,6 @@ class PasswordRecoveryService implements ServiceInterface return false; } - if ($this->getModule()->enableFlashMessages == true) { - Yii::$app->session->setFlash( - 'info', - Yii::t('usuario', 'An email has been sent with instructions for resetting your password') - ); - } - return true; } catch (Exception $e) { Yii::error($e->getMessage(), 'usuario'); diff --git a/src/User/resources/i18n/ca/usuario.php b/src/User/resources/i18n/ca/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/ca/usuario.php +++ b/src/User/resources/i18n/ca/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/da/usuario.php b/src/User/resources/i18n/da/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/da/usuario.php +++ b/src/User/resources/i18n/da/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/de-DU/usuario.php b/src/User/resources/i18n/de-DU/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/de-DU/usuario.php +++ b/src/User/resources/i18n/de-DU/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/de/usuario.php b/src/User/resources/i18n/de/usuario.php index bba81ec..fc2db0f 100644 --- a/src/User/resources/i18n/de/usuario.php +++ b/src/User/resources/i18n/de/usuario.php @@ -17,6 +17,7 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Are you sure you wish the user to change their password at next login?' => '', 'Back to privacy settings' => '', 'Data processing consent' => '', @@ -57,6 +58,7 @@ return [ 'Your personal information has been removed' => '', 'privacy policy' => '', 'A message has been sent to your email address. ' => '@@Eine Nachricht wurde an ihre E-Mail Adresse versandt@@', + 'An email has been sent with instructions for resetting your password' => '@@Eine E-Mail mit den weiteren Schritten zur Passwort-Wiederherstellung wurde versandt@@', 'Awesome, almost there. ' => '@@Fast geschafft. @@', 'Class "{0}" does not exist' => '@@Klasse "{0}" existiert nicht@@', 'Disable Two-Factor Auth' => '@@Zweifaktor-Authentifizierung deaktivieren@@', @@ -92,7 +94,6 @@ return [ 'Account details have been updated' => 'Kontodetails gespeichert', 'Account settings' => 'Kontoeinstellungen', 'Already registered? Sign in!' => 'Bereits registriert? Zur Anmeldung!', - 'An email has been sent with instructions for resetting your password' => 'Eine E-Mail mit den weiteren Schritten zur Passwort-Wiederherstellung wurde versandt', 'An error occurred processing your request' => 'Es ist ein Fehler aufgetreten', 'Are you sure you want to block this user?' => 'Sind Sie sicher, dass Sie diesen Benutzer blockieren wollen?', 'Are you sure you want to confirm this user?' => 'Sind Sie sicher, dass Sie diesen Benutzer bestätigen wollen?', diff --git a/src/User/resources/i18n/es/usuario.php b/src/User/resources/i18n/es/usuario.php index db44f06..34b2f4a 100644 --- a/src/User/resources/i18n/es/usuario.php +++ b/src/User/resources/i18n/es/usuario.php @@ -17,10 +17,12 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Rule class name' => '', 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', + 'An email has been sent with instructions for resetting your password' => '@@Se ha enviado un correo electrónico con instrucciones para restablecer su contraseña@@', 'Two factor authentication protects you against stolen credentials' => '@@La autenticación de dos factores le protege del robo de credenciales@@', '(not set)' => '(sin establecer)', 'A confirmation message has been sent to your new email address' => 'Se ha enviado un mensaje de confirmación a su nueva dirección de correo electrónico', @@ -33,7 +35,6 @@ return [ 'Account details have been updated' => 'Se han actualizado los detalles de la cuenta', 'Account settings' => 'Configuración de la cuenta', 'Already registered? Sign in!' => '¿Ya está registrado? ¡Inicie sesión!', - 'An email has been sent with instructions for resetting your password' => 'Se ha enviado un correo electrónico con instrucciones para restablecer su contraseña', 'An error occurred processing your request' => 'Se ha producido un error al procesar su solicitud', 'Are you sure you want to block this user?' => '¿Seguro que desea bloquear a este usuario?', 'Are you sure you want to confirm this user?' => '¿Seguro que desea confirmar a este usuario?', diff --git a/src/User/resources/i18n/et/usuario.php b/src/User/resources/i18n/et/usuario.php index 9fd8a3b..5e0cf30 100644 --- a/src/User/resources/i18n/et/usuario.php +++ b/src/User/resources/i18n/et/usuario.php @@ -17,6 +17,7 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Authentication rule class {0} can not be instantiated' => '', 'Rule class must extend "yii\\rbac\\Rule".' => '', 'Rule class name' => '', @@ -25,6 +26,7 @@ return [ 'Yandex' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', '{0, date, MMMM dd, YYYY HH:mm}' => '', + 'An email has been sent with instructions for resetting your password' => '@@Saatsime sulle e-kirja juhendiga, kuidas saad oma parooli uuendada@@', '(not set)' => '(määramata)', 'A confirmation message has been sent to your new email address' => 'Saatsime sinu uuele e-maili aadressile kinnituskirja', 'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.' => 'Saatsime sulle kinnituseks e-kirja. Registreerumise kinnitamiseks pead klikkma saadetud kirjas olevale lingile.', @@ -36,7 +38,6 @@ return [ 'Account details have been updated' => 'Konto andmed on uuendatud', 'Account settings' => 'Konto seaded', 'Already registered? Sign in!' => 'Oled registreerunud? Logi sisse!', - 'An email has been sent with instructions for resetting your password' => 'Saatsime sulle e-kirja juhendiga, kuidas saad oma parooli uuendada', 'An error occurred processing your request' => 'Päringu protsessimisel tekkis viga', 'Are you sure you want to block this user?' => 'Oled kindel, et tahad selle kasutaja blokeerid?', 'Are you sure you want to confirm this user?' => 'Oled kindel, et tahad selle kasutaja kinnitada?', diff --git a/src/User/resources/i18n/fa-IR/usuario.php b/src/User/resources/i18n/fa-IR/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/fa-IR/usuario.php +++ b/src/User/resources/i18n/fa-IR/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/fi/usuario.php b/src/User/resources/i18n/fi/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/fi/usuario.php +++ b/src/User/resources/i18n/fi/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/fr/usuario.php b/src/User/resources/i18n/fr/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/fr/usuario.php +++ b/src/User/resources/i18n/fr/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/hr/usuario.php b/src/User/resources/i18n/hr/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/hr/usuario.php +++ b/src/User/resources/i18n/hr/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/hu/usuario.php b/src/User/resources/i18n/hu/usuario.php index b6e648a..5ba1f36 100644 --- a/src/User/resources/i18n/hu/usuario.php +++ b/src/User/resources/i18n/hu/usuario.php @@ -17,10 +17,12 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Rule class name' => '', 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', 'A message has been sent to your email address. ' => '@@Üzenet érkezett az e-mail címedre.@@', + 'An email has been sent with instructions for resetting your password' => '@@E-mailt küldtek a jelszó visszaállításával kapcsolatos utasításokkal@@', 'Awesome, almost there. ' => '@@Hurrá, majdnem kész.@@', 'Disable Two-Factor Auth' => '@@Letiltja a kétütemű hitelesítést@@', 'Enable Two-factor auth' => '@@Engedélyezze a kétütemű hitelesítést@@', @@ -50,7 +52,6 @@ return [ 'Account details have been updated' => 'A fiókadatok frissítve lettek', 'Account settings' => 'Fiók beállítások', 'Already registered? Sign in!' => 'Már regisztrált? Bejelentkezés!', - 'An email has been sent with instructions for resetting your password' => 'E-mailt küldtek a jelszó visszaállításával kapcsolatos utasításokkal', 'An error occurred processing your request' => 'Hiba történt a kérelem feldolgozása során', 'Are you sure you want to block this user?' => 'Biztos benne, hogy letiltja ezt a felhasználót?', 'Are you sure you want to confirm this user?' => 'Biztosan megerősíted ezt a felhasználót?', diff --git a/src/User/resources/i18n/it/usuario.php b/src/User/resources/i18n/it/usuario.php index 3ea9d2d..37ed5f5 100644 --- a/src/User/resources/i18n/it/usuario.php +++ b/src/User/resources/i18n/it/usuario.php @@ -17,10 +17,9 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - 'Rule class name' => 'Nome classe regola', - 'Select rule...' => 'Seleziona una regola...', - 'Two factor authentication protects you in case of stolen credentials' => 'L\'autenticazione a due fattura ti protegge in caso di furto di credenziali', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', '{0, date, MMM dd, YYYY HH:mm}' => '', + 'An email has been sent with instructions for resetting your password' => '@@È stata inviata un\'email con le istruzioni per azzerare la tua password@@', '(not set)' => '(non impostato)', 'A confirmation message has been sent to your new email address' => 'È stato inviato un messaggio di conferma al tuo nuovo indirizzo email', 'A message has been sent to your email address. It contains a confirmation link that you must click to complete registration.' => 'È stato inviato un messaggio al tuo indirizzo email. Contiene un collegamento di verifica che devi aprire per completare la registrazione.', @@ -32,7 +31,6 @@ return [ 'Account details have been updated' => 'I dettagli del tuo account sono stati aggiornati', 'Account settings' => 'Impostazioni account', 'Already registered? Sign in!' => 'Già registrato? Accedi!', - 'An email has been sent with instructions for resetting your password' => 'È stata inviata un\'email con le istruzioni per azzerare la tua password', 'An error occurred processing your request' => 'Si è verificato un errore durante l\'elaborazione della richiesta', 'Are you sure you want to block this user?' => 'Sicuro di voler bloccare questo utente?', 'Are you sure you want to confirm this user?' => 'Sicuro di voler confermare questo utente?', @@ -179,6 +177,7 @@ return [ 'Roles' => 'Ruoli', 'Rule' => 'ruolo', 'Rule class must extend "yii\\rbac\\Rule".' => 'La classe della regola deve estendere "yii\\rbac\\Rule".', + 'Rule class name' => 'Nome classe regola', 'Rule name' => 'Nome regola', 'Rule name {0} is already in use' => 'Regola {0} già in uso', 'Rule {0} does not exists' => 'La regola {0} non esiste', @@ -186,6 +185,7 @@ return [ 'Rules' => 'Regole', 'Save' => 'Salva', 'Scan the QrCode with Google Authenticator App, then insert its temporary code on the box and submit.' => 'Scansiona il codice QR con l\'applicazione Google Authenticator, poi inserisci il codice temporaneo nel riquadro ed invia.', + 'Select rule...' => 'Seleziona una regola...', 'Send password recovery email' => 'Invia email di recupero password', 'Sign in' => 'Accedi', 'Sign up' => 'Registrati', @@ -208,6 +208,7 @@ return [ 'Two Factor Authentication (2FA)' => 'Autenticazione a due fattori (2FA)', 'Two factor authentication code' => 'Codice di autenticazione a due fattori', 'Two factor authentication has been disabled.' => 'Autenticazione a due fattori disabilitata.', + 'Two factor authentication protects you in case of stolen credentials' => 'L\'autenticazione a due fattura ti protegge in caso di furto di credenziali', 'Two factor authentication successfully enabled.' => 'Autenticazione a due fattori abilitata con successo.', 'Unable to confirm user. Please, try again.' => 'Impossibile confermare l\'utente, per favore ritenta.', 'Unable to create an account.' => 'Impossibile creare l\'account.', diff --git a/src/User/resources/i18n/kk/usuario.php b/src/User/resources/i18n/kk/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/kk/usuario.php +++ b/src/User/resources/i18n/kk/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/lt/usuario.php b/src/User/resources/i18n/lt/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/lt/usuario.php +++ b/src/User/resources/i18n/lt/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/nl/usuario.php b/src/User/resources/i18n/nl/usuario.php index 50ad205..7f6f783 100644 --- a/src/User/resources/i18n/nl/usuario.php +++ b/src/User/resources/i18n/nl/usuario.php @@ -17,10 +17,12 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Rule class name' => '', 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', 'A message has been sent to your email address. ' => '@@Een bericht werd naar jouw emailadres verzonden@@', + 'An email has been sent with instructions for resetting your password' => '@@Er werd een email verstuurd met instructies om jouw wachtwoord te resetten@@', 'Awesome, almost there. ' => '@@Super, bijna klaar.@@', 'Class "{0}" does not exist' => '@@Class "{0} bestaat niet@@', 'Disable Two-Factor Auth' => '@@Tweetraps authenticatie uitschakelen@@', @@ -56,7 +58,6 @@ return [ 'Account details have been updated' => 'Account details werden geupdate', 'Account settings' => 'Account instellingen', 'Already registered? Sign in!' => 'Reeds geregistreerd? Log in!', - 'An email has been sent with instructions for resetting your password' => 'Er werd een email verstuurd met instructies om jouw wachtwoord te resetten', 'An error occurred processing your request' => 'Een error trad op terwijl we uw aanvraag verwerkten', 'Are you sure you want to block this user?' => 'Ben je zeker dat je deze gebruiker wil blokkeren?', 'Are you sure you want to confirm this user?' => 'Ben je zeker dat je deze gebruiker wil bevestigen?', diff --git a/src/User/resources/i18n/pl/usuario.php b/src/User/resources/i18n/pl/usuario.php index 89a9b42..8803782 100644 --- a/src/User/resources/i18n/pl/usuario.php +++ b/src/User/resources/i18n/pl/usuario.php @@ -17,9 +17,11 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Rule class name' => '', 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', + 'An email has been sent with instructions for resetting your password' => '@@Email z instrukcją resetowania hasła został wysłany@@', 'Disable Two-Factor Auth' => '@@Wyłącz uwierzytelnianie dwuetapowe@@', 'Enable Two-factor auth' => '@@Włącz uwierzytelnianie dwuetapowe@@', 'I aggree processing of my personal data and the use of cookies @@ -48,7 +50,6 @@ return [ 'Account details have been updated' => 'Szczegóły konta zostały zaktualizowane', 'Account settings' => 'Ustawienia konta', 'Already registered? Sign in!' => 'Masz już konto? Zaloguj się!', - 'An email has been sent with instructions for resetting your password' => 'Email z instrukcją resetowania hasła został wysłany', 'An error occurred processing your request' => 'Wystąpił błąd podczas przetwarzania Twojego zapytania', 'Are you sure you want to block this user?' => 'Czy na pewno chcesz zablokować tego użytkownika?', 'Are you sure you want to confirm this user?' => 'Czy na pewno chcesz aktywować tego użytkownika?', diff --git a/src/User/resources/i18n/pt-BR/usuario.php b/src/User/resources/i18n/pt-BR/usuario.php index 61ef7e9..be9b247 100644 --- a/src/User/resources/i18n/pt-BR/usuario.php +++ b/src/User/resources/i18n/pt-BR/usuario.php @@ -17,10 +17,12 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Rule class name' => '', 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', 'A message has been sent to your email address. ' => '@@Uma mensagem foi enviada para o seu endereço de e-mail.@@', + 'An email has been sent with instructions for resetting your password' => '@@Um e-mail foi enviado com instruções para redefinir sua senha@@', 'Awesome, almost there. ' => '@@Incrível, quase lá.@@', 'Class "{0}" does not exist' => '@@A classe "{0}" não existe@@', 'Disable Two-Factor Auth' => '@@Desabilitar autenticação em dois fatores@@', @@ -56,7 +58,6 @@ return [ 'Account details have been updated' => 'Os detalhes da conta foram atualizados', 'Account settings' => 'Configurações da conta', 'Already registered? Sign in!' => 'Já registrado? Acesse!', - 'An email has been sent with instructions for resetting your password' => 'Um e-mail foi enviado com instruções para redefinir sua senha', 'An error occurred processing your request' => 'Ocorreu um erro ao processar seu pedido', 'Are you sure you want to block this user?' => 'Tem certeza de que deseja bloquear esse usuário?', 'Are you sure you want to confirm this user?' => 'Tem certeza de que deseja confirmar esse usuário?', diff --git a/src/User/resources/i18n/pt-PT/usuario.php b/src/User/resources/i18n/pt-PT/usuario.php index b3ae11f..8d6ee7d 100644 --- a/src/User/resources/i18n/pt-PT/usuario.php +++ b/src/User/resources/i18n/pt-PT/usuario.php @@ -17,6 +17,7 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Awesome, almost there. Now you need to click the confirmation link sent to your new email address.' => '', 'Awesome, almost there. Now you need to click the confirmation link sent to your old email address.' => '', 'Children' => '', @@ -33,6 +34,7 @@ return [ 'Yandex' => '', '{0, date, MMMM dd, YYYY HH:mm}' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@Foi enviado um email com as instruções para restaurar a sua password@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', @@ -68,7 +70,6 @@ return [ 'Account details have been updated' => 'Detalhes da conta foram atualizados', 'Account settings' => 'Definições da conta', 'Already registered? Sign in!' => 'Já está registado? Entre na sua conta!', - 'An email has been sent with instructions for resetting your password' => 'Foi enviado um email com as instruções para restaurar a sua password', 'An error occurred processing your request' => 'Ocorreu um erro ao processar o seu pedido', 'Are you sure you want to block this user?' => 'Tem a certeza que pretende bloquear este utilizador?', 'Are you sure you want to confirm this user?' => 'Tem a certeza que pretende confirmar este utilizador?', diff --git a/src/User/resources/i18n/ro/usuario.php b/src/User/resources/i18n/ro/usuario.php index 6abfd2b..dbb0079 100644 --- a/src/User/resources/i18n/ro/usuario.php +++ b/src/User/resources/i18n/ro/usuario.php @@ -17,10 +17,12 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'Rule class name' => '', 'Select rule...' => '', 'Two factor authentication protects you in case of stolen credentials' => '', 'A message has been sent to your email address. ' => '@@A fost trimis un mesaj la adresa dvs. de e-mail.@@', + 'An email has been sent with instructions for resetting your password' => '@@A fost trimis un e-mail cu instrucțiuni pentru resetarea parolei@@', 'Awesome, almost there. ' => '@@Minunat, aproape gata.@@', 'Disable Two-Factor Auth' => '@@Dezactivați autentificarea cu două factori@@', 'Enable Two-factor auth' => '@@Activați Auth@@', @@ -52,7 +54,6 @@ return [ 'Account details have been updated' => 'Detaliile contului au fost actualizate', 'Account settings' => 'Setările contului', 'Already registered? Sign in!' => 'Deja înregistrat? Conectare!', - 'An email has been sent with instructions for resetting your password' => 'A fost trimis un e-mail cu instrucțiuni pentru resetarea parolei', 'An error occurred processing your request' => 'A apărut o eroare la procesarea solicitării dvs.', 'Are you sure you want to block this user?' => 'Sigur doriți să blocați acest utilizator?', 'Are you sure you want to confirm this user?' => 'Sigur doriți să confirmați acest utilizator?', diff --git a/src/User/resources/i18n/ru/usuario.php b/src/User/resources/i18n/ru/usuario.php index 25d12bf..2adbef1 100644 --- a/src/User/resources/i18n/ru/usuario.php +++ b/src/User/resources/i18n/ru/usuario.php @@ -17,10 +17,12 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - 'Rule class name' => '', - 'Select rule...' => '', - 'Two factor authentication protects you in case of stolen credentials' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => 'Письмо с инструкциями по созданию нового пароля было выслано на {email}, в случае если данный адрес связан с {appName} аккаунтом', + 'Rule class name' => 'Имя класса правила', + 'Select rule...' => 'Выберите правило...', + 'Two factor authentication protects you in case of stolen credentials' => 'Двухфакторная аутентификация защищает вас в случае кражи учетных данных', 'A message has been sent to your email address. ' => '@@Сообщение было отправлено на вашу электронную почту@@', + 'An email has been sent with instructions for resetting your password' => '@@Вам отправлено письмо с инструкциями по смене пароля@@', 'Awesome, almost there. ' => '@@Замечательно, почти готово!@@', 'Class "{0}" does not exist' => '@@Класс "{0}" не найден@@', 'Disable Two-Factor Auth' => '@@Отключить двухфакторную авторизацию@@', @@ -54,7 +56,6 @@ return [ 'Account details have been updated' => 'Аккаунт был обновлен', 'Account settings' => 'Настройки аккаунта', 'Already registered? Sign in!' => 'Уже зарегистрированы? Войдите!', - 'An email has been sent with instructions for resetting your password' => 'Вам отправлено письмо с инструкциями по смене пароля', 'An error occurred processing your request' => 'Во время выполнения запроса произошла ошибка', 'Are you sure you want to block this user?' => 'Вы действительно хотите заблокировать этого пользователя?', 'Are you sure you want to confirm this user?' => 'Вы уверены, что хотите подтвердить аккаунт пользователя?', diff --git a/src/User/resources/i18n/th/usuario.php b/src/User/resources/i18n/th/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/th/usuario.php +++ b/src/User/resources/i18n/th/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/tr-TR/usuario.php b/src/User/resources/i18n/tr-TR/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/tr-TR/usuario.php +++ b/src/User/resources/i18n/tr-TR/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/uk/usuario.php b/src/User/resources/i18n/uk/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/uk/usuario.php +++ b/src/User/resources/i18n/uk/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/vi/usuario.php b/src/User/resources/i18n/vi/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/vi/usuario.php +++ b/src/User/resources/i18n/vi/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/src/User/resources/i18n/zh-CN/usuario.php b/src/User/resources/i18n/zh-CN/usuario.php index 89288fb..1718269 100644 --- a/src/User/resources/i18n/zh-CN/usuario.php +++ b/src/User/resources/i18n/zh-CN/usuario.php @@ -28,7 +28,7 @@ return [ 'Account details have been updated' => '', 'Account settings' => '', 'Already registered? Sign in!' => '', - 'An email has been sent with instructions for resetting your password' => '', + 'An email with instructions to create a new password has been sent to {email} if it is associated with an {appName} account. Your existing password has not been changed.' => '', 'An error occurred processing your request' => '', 'Are you sure you want to block this user?' => '', 'Are you sure you want to confirm this user?' => '', @@ -273,6 +273,7 @@ return [ '{0, date, MMMM dd, YYYY HH:mm}' => '', '{0} cannot be blank.' => '', 'A message has been sent to your email address. ' => '@@@@', + 'An email has been sent with instructions for resetting your password' => '@@@@', 'Awesome, almost there. ' => '@@@@', 'Class "{0}" does not exist' => '@@@@', 'Disable Two-Factor Auth' => '@@@@', diff --git a/tests/functional/RecoveryCept.php b/tests/functional/RecoveryCept.php index 879b39a..3484aaf 100644 --- a/tests/functional/RecoveryCept.php +++ b/tests/functional/RecoveryCept.php @@ -20,7 +20,14 @@ $user = $I->grabFixture('user', 'unconfirmed'); $I->fillField('#recoveryform-email', $user->email); $I->click('Continue'); -$I->see('An email has been sent with instructions for resetting your password'); +$I->see('An email with instructions to create a new password has been sent to ' . $user->email); // ... truncate full message text by email + +$I->amGoingTo('try to request recovery token for non-existing email'); +$I->amOnRoute('/user/recovery/request'); +$I->fillField('#recoveryform-email', 'any@email.com'); +$I->click('Continue'); + +$I->see('An email with instructions to create a new password has been sent to ' . 'any@email.com'); $I->amGoingTo('try to request recovery token'); $I->amOnRoute('/user/recovery/request'); @@ -28,7 +35,7 @@ $user = $I->grabFixture('user', 'user'); $I->fillField('#recoveryform-email', $user->email); $I->click('Continue'); -$I->see('An email has been sent with instructions for resetting your password'); +$I->see('An email with instructions to create a new password has been sent to ' . $user->email); $user = $I->grabRecord(User::className(), ['email' => $user->email]); $token = $I->grabRecord(Token::className(), ['user_id' => $user->id, 'type' => Token::TYPE_RECOVERY]); /** @var yii\swiftmailer\Message $message */