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,13 +106,17 @@ class RegistrationController extends Controller
$mailService = MailFactory::makeWelcomeMailerService($user); $mailService = MailFactory::makeWelcomeMailerService($user);
if ($this->make(UserRegisterService::class, [$user, $mailService])->run()) { if ($this->make(UserRegisterService::class, [$user, $mailService])->run()) {
Yii::$app->session->setFlash( if ($this->module->enableEmailConfirmation) {
'info', Yii::$app->session->setFlash(
Yii::t( 'info',
'usuario', Yii::t(
'Your account has been created and a message with further instructions has been sent to your email' '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); $this->trigger(FormEvent::EVENT_AFTER_REGISTER, $event);
return $this->render( return $this->render(
'/shared/message', '/shared/message',