[support] how to get the list of new nodes since last login?

Jason Flatt drupal at oadaeh.net
Thu May 3 13:28:31 UTC 2007


On Thursday May 3 2007 4:29 am, Haisam Ido wrote:
> Thanks  Nicolas.  But I don't think that would work because by the time
> that query runs the 'login' field in the 'users' table would have been
> updated with the latest 'login' time.  Is there another table that keeps
> the history of user logins?  I know there must be one since users'
> logins are logged.
>

You would probably have to create a custom module and use hook_user to get the 
login time (from the &$user variable, with either the load, login or update 
ops) before Drupal has actually logged in the user, and save it somewhere in 
another database table/field, or using the variable_set/get() functions.

http://api.drupal.org/api/5/function/hook_user


-- 
Jason Flatt
http://www.oadaeh.net/
Father of Six:  http://www.flattfamily.com/ (Joseph, 13; Cramer, 11; Travis, 
9; Angela; Harry, 5; and William, 12:04 am, 12-29-2005)
Linux User:     http://www.kubuntu.org/
Drupal Fanatic: http://drupal.org/


More information about the support mailing list