You are here

function password_policy_uid_load in Password Policy 7

Same name and namespace in other branches
  1. 6 password_policy.module \password_policy_uid_load()

Loads user object from the database.

Parameters

int $uid: The user id.

Return value

object|false A populated user object or FALSE if not found.

File

./password_policy.module, line 205
Allows enforcing restrictions on user passwords by defining policies.

Code

function password_policy_uid_load($uid) {
  if (is_numeric($uid)) {
    $account = user_load($uid);
    if ($account) {
      return $account;
    }
  }
  return FALSE;
}