You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public function actionRegister()
{
if (!$this->module->enableRegistration) {
throw new NotFoundHttpException();
}
/** @var RegistrationForm $form */
$form = $this->make(RegistrationForm::class);
/** @var FormEvent $event */
$event = $this->make(FormEvent::class, [$form]);
$this->make(AjaxRequestModelValidator::class, [$form])->validate();
if ($form->load(Yii::$app->request->post()) && $form->validate()) {
$this->trigger(FormEvent::EVENT_BEFORE_REGISTER, $event);
/** @var User $user */
// Create a temporay $user so we can get the attributes, then get
// the intersection between the $form fields and the $user fields.
$user = $this->make(User::class, [] );
$fields = array_intersect_key($form->attributes, $user->attributes);
// Becomes password_hash
$fields['password'] = $form['password'];
$user = $this->make(User::class, [], $fields );
$user->setScenario('register');
$mailService = MailFactory::makeWelcomeMailerService($user);
if ($this->make(UserRegisterService::class, [$user, $mailService])->run()) {
if ($this->module->enableEmailConfirmation) {
Yii::$app->session->setFlash(
'success',
Yii::t(
'usuario',
'Your account has been created and a message with further instructions has been sent to your email. Please follow the instructions to activate your account before logging in.'
)
);
} else {
Yii::$app->session->setFlash('success', Yii::t('usuario', 'Your account has been created'));
}
$this->trigger(FormEvent::EVENT_AFTER_REGISTER, $event);
$args = [
'link' => '<strong>'.Html::a(
'Click Here',
['/'],
['class' => 'alert-link']
).'</strong>'
];
return $this->render(
'/shared/message',
[
'title' => Yii::t('usuario', 'Your account has been created. {link} to continue.', $args),
'module' => $this->module,
]
);
}
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'User could not be registered.'));
}
return $this->render('register', ['model' => $form, 'module' => $this->module]);
}
any idea why? thank you.
The text was updated successfully, but these errors were encountered:
What steps will reproduce the problem?
when a user registers a new account, or uses social login, they get an error
[error][usuario] Expected response code 250 but got code "454", with message "454 Throttling failure: Daily message quota exceeded.
this is my registration action
any idea why? thank you.
The text was updated successfully, but these errors were encountered: