Commit 6143f13c authored by Gábor Hojtsy's avatar Gábor Hojtsy

#154300 by chx: enforce site user account creation policy in openid module too

parent 1f5ea296
......@@ -345,7 +345,7 @@ function openid_authentication($response) {
drupal_set_message(t('You must validate your email address for this account before logging in via OpenID'));
}
}
else {
elseif (variable_get('user_register', 1)) {
// Register new user
$form_state['redirect'] = NULL;
$form_state['values']['name'] = (empty($response['openid.sreg.nickname'])) ? $identity : $response['openid.sreg.nickname'];
......@@ -374,6 +374,9 @@ function openid_authentication($response) {
}
drupal_redirect_form($form, $form_state['redirect']);
}
else {
drupal_set_message(t('Only site administrators can create new user accounts.'), 'error');
}
drupal_goto();
}
......
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