You are here

function role_expire_get_expired in Role Expire 6

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

API function; Get all records that should be expired.

Parameters

$time: Optional. The time to check, if not set it will check current time.

1 call to role_expire_get_expired()
role_expire_cron in ./role_expire.module
Implementation of hook_cron().

File

./role_expire.module, line 143
Role Expire module

Code

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