Merge pull request #152 from faenir/master
Check enableEmailConfirmation
This commit is contained in:
@ -106,13 +106,17 @@ 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',
|
||||
|
||||
Reference in New Issue
Block a user