You are here

function _audit_log_user_exists in Audit Log 7

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

1 call to _audit_log_user_exists()
audit_log_user_login_validate in modules/audit_log_user/audit_log_user.module
Validate user entered password on login

File

modules/audit_log_user/audit_log_user.module, line 68
User related hook implemenations for the Audit log module.

Code

function _audit_log_user_exists($username) {
  $q = db_select('users', 'u');
  $q
    ->addField('u', 'uid');
  $q
    ->where('LOWER(u.name) = :username', array(
    ':username' => strtolower($username),
  ));
  return $q
    ->execute()
    ->fetchField();
}