#154300 by chx: enforce site user account creation policy in openid module too
parent
1f5ea29689
commit
6143f13c41
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue