Same name and namespace in other branches
- 6.x modules/user/user.module \user_login_name_validate()
A FAPI validate handler. Sets an error if supplied username has been blocked.
1 call to user_login_name_validate()
- openid_authentication in modules/
openid/ openid.module - Authenticate a user or attempt registration.
1 string reference to 'user_login_name_validate'
- user_login_default_validators in modules/
user/ user.module - Set up a series for validators which check for blocked users, then authenticate against local database, then return an error if authentication fails. Distributed authentication modules are welcome to use hook_form_alter() to change this series in…
File
- modules/
user/ user.module, line 2166 - Enables the user registration and login system.
Code
function user_login_name_validate($form, &$form_state) {
if (!empty($form_state['values']['name']) && user_is_blocked($form_state['values']['name'])) {
// Blocked in user administration.
form_set_error('name', t('The username %name has not been activated or is blocked.', array(
'%name' => $form_state['values']['name'],
)));
}
}