<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt">Put simply (SQL Server english query style) I need to get <br><br>"how long it has been since the user last visited"<br>&nbsp;<br>"the time/date of the users last visit"<br><br>made available to a module when the user logs in.<br> <div>&nbsp;</div><div> <div><font face="Arial" size="2">Carl Mc Dade<br>____________________________<br>Web Developer<br><br></font></div><div><font face="Arial" size="2"><br>&nbsp;</font></div></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: AjK &lt;drupal@f2s.com&gt;<br>To: development@drupal.org<br>Sent: Monday, February 12, 2007 6:10:54 PM<br>Subject: Re: [development] No last access?<br><br><div>Carl,<br><br>&gt; Nope,
 That is updated first so their is no way of pulling<br>&gt; the old time code before the newer on sets. This is the<br>&gt; same problem as the access object. As matter of fact the<br>&gt; login ia updated a split second before the access time.<br>&gt;<br>&gt; access = 1171296985<br>&gt; login= 1171296984<br><br>OK, let's go back to basics.... here's your question again:<br><br>&gt; Is there no longer a last access functionality?<br>&gt; using the global user and calling $user-&gt;access<br>&gt; gives the value after the database has been updated.<br>&gt; Not the value in the database at the time of login.<br>&gt; Ex. the value in the database table is 0000002.<br>&gt; You will not get this value but the value 0000003<br>&gt; which is the time of the latest access.<br><br>The -&gt;login is updated when a user logs in. It's updated<br>just once at the login time. So I'm reading your question<br>again and, if it's not -&gt;login that you want you'll have<br>to rephrase your
 question to make sense. I read your<br>question as "I want the time the user actually logged in".<br><br>Also, you might avoid the "confrontational" type responses<br>by wording your question in a non-confrontational manner.<br>"Is there no longer a last access functionality?" sounds<br>like your accusing some Drupal Ninja Squirrel of stealing<br>some of your nuts.<br><br>How about posting:-<br><br>&nbsp;&nbsp;"I want to find the time for this particular event... blah blah"<br><br>Basically, what I want to know is what do you mean by "last access<br>functionality"?<br><br>We have<br>&nbsp;&nbsp;-&gt;login which is timestamp at login<br>&nbsp;&nbsp;-&gt;access which is timestamp at last browser hit<br><br>You want<br>&nbsp;&nbsp;-&gt;something<br><br>Define something.<br><br>One point; "Nope, That is updated first so their is no way of pulling the<br>old time code before the newer on sets". Erm, just how far back do you want<br>to go? You are experimenting on global $user
 and so I assume you logged in<br>to test, so I would expect recent values for -&gt;login and -&gt;access<br><br>Imagine you are using user foo (eg uid = 1234). If you load that user object<br>what you appear to asking for here is "when did that user login the time<br>before the last login?". That's rather odd functionality to expect of any<br>system except those that keep a record of every login time, forever.<br>-&gt;login is "the last time the user logged in" not "the last time the user<br>logged in before last".<br><br>So, it seems your question and your responses to date have been a little<br>unclear.<br><br>regards,<br>--Andy<br><br>(ps, I'm trying to help ;)<br><br><br></div></div><br></div></div><br>

<hr size=1>Need Mail bonding?<br>Go to the <a href="http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396546091">Yahoo! Mail Q&A</a> for <a href="http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396546091">great tips from Yahoo! Answers</a> users.</body></html>