Check enableEmailConfirmation

This commit is contained in:
Arthur Khachaturov
2018-02-09 15:41:15 +03:00
committed by GitHub
parent 51c9c9a30f
commit 4928df0770

View File

@ -106,6 +106,7 @@ class RegistrationController extends Controller
$mailService = MailFactory::makeWelcomeMailerService($user);
if ($this->make(UserRegisterService::class, [$user, $mailService])->run()) {
if ($this->module->enableEmailConfirmation) {
Yii::$app->session->setFlash(
'info',
Yii::t(
@ -113,6 +114,9 @@ class RegistrationController extends Controller
'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',