diff --git a/CHANGELOG.md b/CHANGELOG.md index f432a9f..d789487 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # CHANGELOG ## 1.0.14 - Work in progress + +- 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) diff --git a/src/User/Controller/AdminController.php b/src/User/Controller/AdminController.php index 81c71b6..00ab267 100644 --- a/src/User/Controller/AdminController.php +++ b/src/User/Controller/AdminController.php @@ -138,8 +138,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]); + } else { + Yii::$app->session->setFlash( 'danger', Yii::t('usuario', 'User account could not be created.')); } } diff --git a/src/User/Controller/RegistrationController.php b/src/User/Controller/RegistrationController.php index 53899ef..b9501b0 100644 --- a/src/User/Controller/RegistrationController.php +++ b/src/User/Controller/RegistrationController.php @@ -114,7 +114,6 @@ class RegistrationController extends Controller ) ); $this->trigger(FormEvent::EVENT_AFTER_REGISTER, $event); - return $this->render( '/shared/message', [ @@ -122,16 +121,11 @@ class RegistrationController extends Controller 'module' => $this->module, ] ); + } else { + 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) diff --git a/src/User/Event/MailEvent.php b/src/User/Event/MailEvent.php new file mode 100644 index 0000000..75bce1a --- /dev/null +++ b/src/User/Event/MailEvent.php @@ -0,0 +1,67 @@ + + * + * 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; + +/** + * Mailer event to trap and handle mail exceptions for user model actions + * + * @author Kartik Visweswaran + */ +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->mailService; + } +} diff --git a/src/User/Factory/MailFactory.php b/src/User/Factory/MailFactory.php index 2fef8b7..aea6550 100644 --- a/src/User/Factory/MailFactory.php +++ b/src/User/Factory/MailFactory.php @@ -11,12 +11,19 @@ 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; +/** + * Class MailFactory + * + * @package Da\User\Factory + * @modified 2017-10-18 by Kartik Visweswaran + */ class MailFactory { /** @@ -39,7 +46,7 @@ class MailFactory 'showPassword' => $showPassword, ]; - return static::makeMailerService($from, $to, $subject, 'welcome', $params); + return static::makeMailerService(MailEvent::TYPE_WELCOME, $from, $to, $subject, 'welcome', $params); } /** @@ -60,7 +67,7 @@ class MailFactory 'token' => $token, ]; - return static::makeMailerService($from, $to, $subject, 'recovery', $params); + return static::makeMailerService(MailEvent::TYPE_RECOVERY, $from, $to, $subject, 'recovery', $params); } /** @@ -81,7 +88,7 @@ class MailFactory 'token' => $token, ]; - return static::makeMailerService($from, $to, $subject, 'recovery', $params); + return static::makeMailerService(MailEvent::TYPE_CONFIRM, $from, $to, $subject, 'recovery', $params); } /** @@ -105,12 +112,13 @@ class MailFactory 'token' => $token, ]; - return static::makeMailerService($from, $to, $subject, 'recovery', $params); + return static::makeMailerService(MailEvent::TYPE_RECONFIRM, $from, $to, $subject, 'recovery', $params); } /** * Builds a MailerService. * + * @param string $type * @param string $from * @param string $to * @param string $subject @@ -119,8 +127,12 @@ class MailFactory * * @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/Service/MailService.php b/src/User/Service/MailService.php index a3c2414..81e9b9c 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/PasswordRecoveryService.php b/src/User/Service/PasswordRecoveryService.php index ec0733b..08e7239 100644 --- a/src/User/Service/PasswordRecoveryService.php +++ b/src/User/Service/PasswordRecoveryService.php @@ -16,12 +16,15 @@ 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 Exception; use Yii; use yii\log\Logger; class PasswordRecoveryService implements ServiceInterface { + use MailAwareTrait; + protected $query; protected $email; @@ -51,7 +54,7 @@ class PasswordRecoveryService implements ServiceInterface $this->mailService->setViewParam('user', $user); $this->mailService->setViewParam('token', $token); - if (!$this->mailService->run()) { + if (!$this->sendMail($user)) { return false; } diff --git a/src/User/Service/ResendConfirmationService.php b/src/User/Service/ResendConfirmationService.php index 119d495..e70618a 100644 --- a/src/User/Service/ResendConfirmationService.php +++ b/src/User/Service/ResendConfirmationService.php @@ -14,10 +14,13 @@ namespace Da\User\Service; use Da\User\Contracts\ServiceInterface; use Da\User\Factory\TokenFactory; use Da\User\Model\User; +use Da\User\Traits\MailAwareTrait; use yii\log\Logger; class ResendConfirmationService implements ServiceInterface { + use MailAwareTrait; + protected $model; protected $mailService; protected $logger; @@ -34,8 +37,7 @@ class ResendConfirmationService implements ServiceInterface if ($this->model && !$this->model->getIsConfirmed()) { $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/UserCreateService.php b/src/User/Service/UserCreateService.php index 0cab543..9769362 100644 --- a/src/User/Service/UserCreateService.php +++ b/src/User/Service/UserCreateService.php @@ -15,12 +15,16 @@ 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; @@ -57,15 +61,23 @@ class UserCreateService implements ServiceInterface if (!$model->save()) { $transaction->rollBack(); - return false; } $model->trigger(UserEvent::EVENT_AFTER_CREATE); - - $this->mailService->run(); + 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(); diff --git a/src/User/Service/UserRegisterService.php b/src/User/Service/UserRegisterService.php index 9e79dda..b14d4a2 100644 --- a/src/User/Service/UserRegisterService.php +++ b/src/User/Service/UserRegisterService.php @@ -16,16 +16,17 @@ 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\base\InvalidCallException; use yii\log\Logger; +use Yii; class UserRegisterService implements ServiceInterface { use ModuleAwareTrait; - use ContainerAwareTrait; + use MailAwareTrait; protected $model; protected $securityHelper; @@ -61,7 +62,6 @@ class UserRegisterService implements ServiceInterface if (!$model->save()) { $transaction->rollBack(); - return false; } @@ -72,8 +72,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(); diff --git a/src/User/Traits/MailAwareTrait.php b/src/User/Traits/MailAwareTrait.php new file mode 100644 index 0000000..93df57b --- /dev/null +++ b/src/User/Traits/MailAwareTrait.php @@ -0,0 +1,53 @@ + + * + * 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\QrCode\Exception\InvalidConfigException; +use Da\User\Event\MailEvent; +use Da\User\Model\User; +use Da\User\Service\MailService; +use Exception; +use yii\log\Logger; + +/** + * @property MailService $mailService + * @property Logger $logger + * @author Kartik Visweswaran + */ +trait MailAwareTrait +{ + use ContainerAwareTrait; + + /** + * Sends a mailer + * + * @param User $user + * + * @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]); + $this->logger->log($e->getMessage(), Logger::LEVEL_ERROR); + $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/resources/i18n/ca/usuario.php b/src/User/resources/i18n/ca/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/ca/usuario.php +++ b/src/User/resources/i18n/ca/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '', diff --git a/src/User/resources/i18n/da/usuario.php b/src/User/resources/i18n/da/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/da/usuario.php +++ b/src/User/resources/i18n/da/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '', diff --git a/src/User/resources/i18n/de-DU/usuario.php b/src/User/resources/i18n/de-DU/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/de-DU/usuario.php +++ b/src/User/resources/i18n/de-DU/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '', diff --git a/src/User/resources/i18n/de/usuario.php b/src/User/resources/i18n/de/usuario.php index 389702b..1f0155f 100644 --- a/src/User/resources/i18n/de/usuario.php +++ b/src/User/resources/i18n/de/usuario.php @@ -35,6 +35,8 @@ return [ 'Disable Two-Factor Auth' => '', 'Enable' => '', 'Enable Two-factor auth' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Impersonate this user' => '', 'Invalid two-factor code' => '', 'Last login' => '', @@ -67,6 +69,8 @@ return [ 'Unable to update authorization rule.' => '', 'Update rule' => '', 'Updated at' => '', + '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.' => '', diff --git a/src/User/resources/i18n/es/usuario.php b/src/User/resources/i18n/es/usuario.php index eb831f9..6f1b237 100644 --- a/src/User/resources/i18n/es/usuario.php +++ b/src/User/resources/i18n/es/usuario.php @@ -17,9 +17,10 @@ * NOTE: this file must be saved in UTF-8 encoding. */ return [ - '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?', - 'Send password recovery email' => 'Enviar email de recuperación de contraseña', - 'Unable to send recovery message to the user' => 'Ha sido imposible enviar el email de recuperación de contraseña', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', + 'User account could not be created.' => '', + 'User could not be registered.' => '', '(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.', @@ -38,6 +39,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', @@ -164,6 +166,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', @@ -195,6 +198,7 @@ return [ '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.', diff --git a/src/User/resources/i18n/fa-IR/usuario.php b/src/User/resources/i18n/fa-IR/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/fa-IR/usuario.php +++ b/src/User/resources/i18n/fa-IR/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '', diff --git a/src/User/resources/i18n/fi/usuario.php b/src/User/resources/i18n/fi/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/fi/usuario.php +++ b/src/User/resources/i18n/fi/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '', diff --git a/src/User/resources/i18n/fr/usuario.php b/src/User/resources/i18n/fr/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/fr/usuario.php +++ b/src/User/resources/i18n/fr/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '', diff --git a/src/User/resources/i18n/hr/usuario.php b/src/User/resources/i18n/hr/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/hr/usuario.php +++ b/src/User/resources/i18n/hr/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '', diff --git a/src/User/resources/i18n/hu/usuario.php b/src/User/resources/i18n/hu/usuario.php index 9db8843..0f1d9cd 100644 --- a/src/User/resources/i18n/hu/usuario.php +++ b/src/User/resources/i18n/hu/usuario.php @@ -27,6 +27,8 @@ return [ 'Disable Two-Factor Auth' => '', 'Enable' => '', 'Enable Two-factor auth' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Invalid two-factor code' => '', 'Last login' => '', 'Never' => '', @@ -47,6 +49,8 @@ return [ 'Two-factor code' => '', 'Unable to disable two-factor authorization.' => '', '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.' => '', diff --git a/src/User/resources/i18n/it/usuario.php b/src/User/resources/i18n/it/usuario.php index 3fa947f..cfad813 100644 --- a/src/User/resources/i18n/it/usuario.php +++ b/src/User/resources/i18n/it/usuario.php @@ -27,6 +27,8 @@ return [ 'Disable Two-Factor Auth' => '', 'Enable' => '', 'Enable Two-factor auth' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Invalid two-factor code' => '', 'Last login' => '', 'Never' => '', @@ -47,6 +49,8 @@ return [ 'Two-factor code' => '', 'Unable to disable two-factor authorization.' => '', '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.' => '', diff --git a/src/User/resources/i18n/kk/usuario.php b/src/User/resources/i18n/kk/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/kk/usuario.php +++ b/src/User/resources/i18n/kk/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '', diff --git a/src/User/resources/i18n/lt/usuario.php b/src/User/resources/i18n/lt/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/lt/usuario.php +++ b/src/User/resources/i18n/lt/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '', diff --git a/src/User/resources/i18n/nl/usuario.php b/src/User/resources/i18n/nl/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/nl/usuario.php +++ b/src/User/resources/i18n/nl/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '', diff --git a/src/User/resources/i18n/pl/usuario.php b/src/User/resources/i18n/pl/usuario.php index 0da67e2..933b49b 100644 --- a/src/User/resources/i18n/pl/usuario.php +++ b/src/User/resources/i18n/pl/usuario.php @@ -19,6 +19,8 @@ return [ '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.' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Required "key" cannot be empty.' => '', 'Required "secret" cannot be empty.' => '', 'Role "{0}" not found. Creating it.' => '', @@ -26,6 +28,8 @@ return [ 'The "recaptcha" component must be configured.' => '', 'The verification code is incorrect.' => '', 'Unable to send recovery message to the user' => '', + 'User account could not be created.' => '', + 'User could not be registered.' => '', '{0} cannot be blank.' => '', '(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', diff --git a/src/User/resources/i18n/pt-BR/usuario.php b/src/User/resources/i18n/pt-BR/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/pt-BR/usuario.php +++ b/src/User/resources/i18n/pt-BR/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '', diff --git a/src/User/resources/i18n/pt-PT/usuario.php b/src/User/resources/i18n/pt-PT/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/pt-PT/usuario.php +++ b/src/User/resources/i18n/pt-PT/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '', diff --git a/src/User/resources/i18n/ro/usuario.php b/src/User/resources/i18n/ro/usuario.php index ed4b198..f8b45e4 100644 --- a/src/User/resources/i18n/ro/usuario.php +++ b/src/User/resources/i18n/ro/usuario.php @@ -27,6 +27,8 @@ return [ 'Disable Two-Factor Auth' => '', 'Enable' => '', 'Enable Two-factor auth' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Invalid two-factor code' => '', 'Last login' => '', 'Never' => '', @@ -47,6 +49,8 @@ return [ 'Two-factor code' => '', 'Unable to disable two-factor authorization.' => '', '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.' => '', diff --git a/src/User/resources/i18n/ru/usuario.php b/src/User/resources/i18n/ru/usuario.php index 6152337..076dc77 100644 --- a/src/User/resources/i18n/ru/usuario.php +++ b/src/User/resources/i18n/ru/usuario.php @@ -27,6 +27,8 @@ return [ 'Disable Two-Factor Auth' => '', 'Enable' => '', 'Enable Two-factor auth' => '', + 'Error sending registration message to "{email}". Please try again later.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Invalid two-factor code' => '', 'Last login' => '', 'Never' => '', @@ -47,6 +49,8 @@ return [ 'Two-factor code' => '', 'Unable to disable two-factor authorization.' => '', '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.' => '', diff --git a/src/User/resources/i18n/th/usuario.php b/src/User/resources/i18n/th/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/th/usuario.php +++ b/src/User/resources/i18n/th/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '', diff --git a/src/User/resources/i18n/tr_TR/usuario.php b/src/User/resources/i18n/tr_TR/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/tr_TR/usuario.php +++ b/src/User/resources/i18n/tr_TR/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '', diff --git a/src/User/resources/i18n/uk/usuario.php b/src/User/resources/i18n/uk/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/uk/usuario.php +++ b/src/User/resources/i18n/uk/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '', diff --git a/src/User/resources/i18n/vi/usuario.php b/src/User/resources/i18n/vi/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/vi/usuario.php +++ b/src/User/resources/i18n/vi/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '', diff --git a/src/User/resources/i18n/zh-CN/usuario.php b/src/User/resources/i18n/zh-CN/usuario.php index 09cc45d..2284ace 100644 --- a/src/User/resources/i18n/zh-CN/usuario.php +++ b/src/User/resources/i18n/zh-CN/usuario.php @@ -94,6 +94,8 @@ return [ '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.' => '', + 'Error sending welcome message to "{email}". Please try again later.' => '', 'Finish' => '', 'Forgot password?' => '', 'Gravatar email' => '', @@ -207,7 +209,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' => '',