Commit 61b225ee authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

161496 by meba: display message about successful login, if registration...

161496 by meba: display message about successful login, if registration verification is not required
parent 50955e38
......@@ -1430,7 +1430,9 @@ function user_register_submit($form, &$form_state) {
else if (!variable_get('user_email_verification', TRUE) && $account->status && !$admin) {
// No e-mail verification is required, create new user account, and login user immediately.
_user_mail_notify('register_no_approval_required', $account);
user_authenticate($account->name, trim($pass));
if (user_authenticate($account->name, trim($pass))) {
drupal_set_message(t('Registration succesful. You are now logged in.'));
}
$form_state['redirect'] = '';
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment