You are here

function role_expire_get_user_role_expiry_time in Role Expire 6

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

API function; Get expiration time of a user role.

Parameters

$uid: User ID.

$rid: Role ID.

Return value

Array with the expiration time.

2 calls to role_expire_get_user_role_expiry_time()
role_expire_add_expiration_input in ./role_expire.module
Add form element that accepts the role expiration time.
role_expire_process_default_role_duration_for_user in ./role_expire.module

File

./role_expire.module, line 26
Role Expire module

Code

function role_expire_get_user_role_expiry_time($uid, $rid) {
  $result = db_fetch_array(db_query("SELECT expiry_timestamp FROM {role_expire} WHERE uid=%d AND rid = %d", $uid, $rid));
  return !empty($result) ? $result['expiry_timestamp'] : '';
}