history_read

history_read($nid)

Retrieves the timestamp for the current user's last view of a specified node.

Parameters

int $nid: A node ID.

Return value

int If a node has been previously viewed by the user, the timestamp in seconds of when the last view occurred; otherwise, zero.

File

core/modules/history/history.module, line 46
Records which users have read which content.

Code

function history_read($nid) {
  $history = history_read_multiple(array($nid));
  return $history[$nid];
}
doc_Drupal
2016-10-29 09:17:43
Comments
Leave a Comment

Please login to continue.