[development] No last access?
Carl Mc Dade
carl_mcdade at yahoo.com
Mon Feb 12 15:02:11 UTC 2007
I have a better idea. You fire up your debugger and show me. Every instance I have found is based on code similar to this:
$user->access ? t('%time ago', array('%time' => format_interval(time() - $account->access))) : t('never')
Tracing $user->access back leads to the same conclusion as I came to in the beginning. The $user-access is being loaded and updated before it is presented. To give another simple example I first looked at the time codes in phpmyadmin. I have a simple php snippet that just sets the $user->access time, time() and login in time to print to screen. I expected to see the differences. which I did. So I thought things were working. But when I refreshed the phpmyadmin browser it showed that calling the snippet had actually updated the database date. So the access time shows the time that the snippet was run.
Carl Mc Dade
----- Original Message ----
From: Moshe Weitzman <weitzman at tejasa.com>
To: development at drupal.org
Sent: Monday, February 12, 2007 3:32:12 PM
Subject: Re: [development] No last access?
Carl Mc Dade wrote:
> Well, I spent sunday evening being sick and looking over last access
> functionality historically as per Bérs advice. I looked back to version
> 4.4 to 4.7.4. a found surprisingly that Drupal has never really had a
> last access functionality. It has had calculation code to gather such
> information but nothing definative. Strangely enough there has not been
> too much call for this information so no one has noticed.
This is all nonsense. The user admin page shows you last access for each
user. And that number is accurate, so we must be collecting that info
somewhere. Furthermore, access is easily available for all modules in the
standard $user object.
Fire up your debugger and you will see the writing of this infomation in
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development