You are here

function role_expire_get_all_user_records in Role Expire 6

Same name and namespace in other branches
  1. 7 role_expire.module \role_expire_get_all_user_records()

API function; Get expiration of all roles of a user.

Parameters

$uid: User ID.

$rid: Role ID.

Return value

Array with the expiration time.

1 call to role_expire_get_all_user_records()
role_expire_user in ./role_expire.module
Implementation of hook_user().

File

./role_expire.module, line 40
Role Expire module

Code

function role_expire_get_all_user_records($uid) {
  $return = array();
  $result = db_query("SELECT rid, expiry_timestamp FROM {role_expire} WHERE uid=%d", $uid);
  while ($row = db_fetch_array($result)) {
    $return[$row['rid']] = $row['expiry_timestamp'];
  }
  return $return;
}