function content_get_last_access

7.x content.module content_get_last_access($cid, $account = null)
6.x content.module content_get_last_access($cid, $account = null)

Returns the timestamp of last access, or ZERO if never accessed

2 calls to content_get_last_access()
alerts_advisees_alerts_form in modules/alerts/alerts.module
Displays alerts for our various advisees.
engagements_display_advisee_engagements_page in modules/engagements/engagements.module

File

modules/content/content.module, line 624

Code

function content_get_last_access($cid, $account = null) {
  global $user;
  if ($account == NULL) {
    $account = $user;
  }

  $res = db_result(db_query("SELECT last_access FROM content_last_access WHERE cid = ? AND user_id = ?", array($cid, $account->id)));

  return intval($res);

}