function user_is_blocked in Drupal 6
Same name and namespace in other branches
- 8 core/modules/user/user.module \user_is_blocked()
- 4 modules/user.module \user_is_blocked()
- 5 modules/user/user.module \user_is_blocked()
- 7 modules/user/user.module \user_is_blocked()
- 9 core/modules/user/user.module \user_is_blocked()
Checks for usernames blocked by user administration.
Parameters
$name: A string containing a name of the user.
Return value
Object with property 'name' (the user name), if the user is blocked; FALSE if the user is not blocked.
1 call to user_is_blocked()
- user_login_name_validate in modules/
user/ user.module - A FAPI validate handler. Sets an error if supplied username has been blocked or denied access.
File
- modules/
user/ user.module, line 553 - Enables the user registration and login system.
Code
function user_is_blocked($name) {
$deny = db_fetch_object(db_query("SELECT name FROM {users} WHERE status = 0 AND name = LOWER('%s')", $name));
return $deny;
}