You are here

function userprotect_get_username in User protect 7

Same name and namespace in other branches
  1. 5 userprotect.module \userprotect_get_username()
  2. 6 userprotect.module \userprotect_get_username()

Gives the username of a protected user.

Parameters

int $uid: The user ID.

Return value

string The username.

1 call to userprotect_get_username()
userprotect_protections_bypass_submit in ./userprotect.admin.inc
Processes the submitted user protection form.

File

./userprotect.module, line 804
Main module file for the userprotect module.

Code

function userprotect_get_username($uid) {
  return db_query('SELECT name FROM {users} WHERE uid = :uid', array(
    ':uid' => $uid,
  ))
    ->fetchField();
}