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

1
2
3
4
function history_read($nid) {
  $history = history_read_multiple(array($nid));
  return $history[$nid];
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.