Merge pull request #152 from faenir/master

Check enableEmailConfirmation
This commit is contained in:
Antonio Ramirez
2018-02-14 11:19:02 +01:00
committed by GitHub
2 changed files with 13 additions and 9 deletions

View File

@ -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',