You are here

function _username_check_is_user_exists in Username originality AJAX check 5

Same name and namespace in other branches
  1. 8 username_check.unique.inc \_username_check_is_user_exists()
  2. 6 username_check.unique.inc \_username_check_is_user_exists()
  3. 7 username_check.unique.inc \_username_check_is_user_exists()

Query user table to check if such username is already exists.

1 call to _username_check_is_user_exists()
username_check_callback in ./username_check.module
Main AJAX function: originality check menu callback.

File

./username_check.module, line 131
Checks user name availability on registration page.

Code

function _username_check_is_user_exists($username) {
  return db_result(db_query("SELECT COUNT(u.name) FROM {users} u WHERE u.name = '%s'", $username));
}