Drupal 7: Determine if a Path was Viewed by a User in a Given Timeframe

This code example allows you to determine if a user has visited a given page on your site in a given time frame.

You can accomplish exactly that by calling the following function from hook_login():