This project is not covered by Drupal’s security advisory policy.

*Currently functioning, but contains known issues. Not all functionality exists.

Description

This module creates a database table which stores the last access timestamp per node per user.

The goal is to bypass Drupal's cache so we always have the latest timetsamp.

This module provides:

  • Custom database table
  • Custom Views group "Node Access Timestamp by User"

What this module does:

  • Creates a database table on install
  • During hook_preprocess_node(), gets current uid, nid, and timestamp
  • Checks if a table row for uid and nid exists
  • If a row contains current uid and nid, overwrites associated timestamp
  • If nothing exists, creates a new row entry of uid, nid, and timestamp


Configuration

  • Create a view to show "Node Access Timestamp by User" under "view settings"
  • Set view settings to not cache under "advanced column"
  • Configure as needed


Custom Database Table

This table is updated via HOOK_proprocess_node() and builds the data in the following structure:

uid nid timestamp bundle langcode
current user id current node id current timestamp bundle name langcode

Database table name:

node_access_timestamp_by_user

Now our timestamp is stored in a database table with associated uid and nid.


Available relationships:

  • uid
  • nid


Attached is an example view you can import.

AttachmentSize
NATU Example View Import.txt13.88 KB

Project information

Releases