function user_is_blocked

user_is_blocked($name)

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.

File

modules/user/user.module, line 843
Enables the user registration and login system.

Code

function user_is_blocked($name) {
  return db_select('users')
    ->fields('users', array('name'))
    ->condition('name', db_like($name), 'LIKE')
    ->condition('status', 0)
    ->execute()->fetchObject();
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!user!user.module/function/user_is_blocked/7.x