I would like the time of the last completed login. What I am using now is<br><br>function module_user($op, &amp;$edit, &amp;$account, $category = NULL) {<br>&nbsp; global $user;<br>&nbsp; <br>&nbsp; if ($op == 'login') {<br><br>/// get the time of the last login<br>print "you have been away for 30 martian years";<br>&nbsp;&nbsp;&nbsp; <br>}<br>}<br><br><b><i>Eric Goldhagen &lt;eric@openflows.org&gt;</i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> At 9:22 AM -0800 2/12/07, Carl Mc Dade wrote:<br>&gt;Put simply (SQL Server english query style) I need to get<br>&gt;<br>&gt;"how long it has been since the user last visited"<br>&gt;<br>&gt;"the time/date of the users last visit"<br>&gt;<br>&gt;made available to a module when the user logs in.<br><br>by "last visit" do you mean the last time they <br>filled in the form and logged in, or the time <br>they last visited a page?<br><br>This is an
 important difference and one that <br>people have asked you to clarify so they can <br>assist. For example my last login to drupal.org <br>was almost 24 hours ago, the last time I visited <br>a page while logged in was about 30 seconds ago. <br>Which do you need available to your <br>function/module?<br><br>--Eric<br><br>&gt;<br>&gt;Carl Mc Dade<br>&gt;____________________________<br>&gt;Web Developer<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;----- Original Message ----<br>&gt;From: AjK <drupal@f2s.com><br>&gt;To: development@drupal.org<br>&gt;Sent: Monday, February 12, 2007 6:10:54 PM<br>&gt;Subject: Re: [development] No last access?<br>&gt;<br>&gt;Carl,<br>&gt;<br>&gt;&gt;  Nope, That is updated first so their is no way of pulling<br>&gt;&gt;  the old time code before the newer on sets. This is the<br>&gt;&gt;  same problem as the access object. As matter of fact the<br>&gt;&gt;  login ia updated a split second before the access time.<br>&gt;&gt;<br>&gt;&gt;  access
 = 1171296985<br>&gt;&gt;  login= 1171296984<br>&gt;<br>&gt;OK, let's go back to basics.... here's your question again:<br>&gt;<br>&gt;&gt;  Is there no longer a last access functionality?<br>&gt;&gt;  using the global user and calling $user-&gt;access<br>&gt;&gt;  gives the value after the database has been updated.<br>&gt;&gt;  Not the value in the database at the time of login.<br>&gt;&gt;  Ex. the value in the database table is 0000002.<br>&gt;&gt;  You will not get this value but the value 0000003<br>&gt;&gt;  which is the time of the latest access.<br>&gt;<br>&gt;The -&gt;login is updated when a user logs in. It's updated<br>&gt;just once at the login time. So I'm reading your question<br>&gt;again and, if it's not -&gt;login that you want you'll have<br>&gt;to rephrase your question to make sense. I read your<br>&gt;question as "I want the time the user actually logged in".<br>&gt;<br>&gt;Also, you might avoid the "confrontational" type responses<br>&gt;by wording
 your question in a non-confrontational manner.<br>&gt;"Is there no longer a last access functionality?" sounds<br>&gt;like your accusing some Drupal Ninja Squirrel of stealing<br>&gt;some of your nuts.<br>&gt;<br>&gt;How about posting:-<br>&gt;<br>&gt;  &nbsp;"I want to find the time for this particular event... blah blah"<br>&gt;<br>&gt;Basically, what I want to know is what do you mean by "last access<br>&gt;functionality"?<br>&gt;<br>&gt;We have<br>&gt;  &nbsp;-&gt;login which is timestamp at login<br>&gt;  &nbsp;-&gt;access which is timestamp at last browser hit<br>&gt;<br>&gt;You want<br>&gt;  &nbsp;-&gt;something<br>&gt;<br>&gt;Define something.<br>&gt;<br>&gt;One point; "Nope, That is updated first so their is no way of pulling the<br>&gt;old time code before the newer on sets". Erm, just how far back do you want<br>&gt;to go? You are experimenting on global $user and so I assume you logged in<br>&gt;to test, so I would expect recent values for -&gt;login and
 -&gt;access<br>&gt;<br>&gt;Imagine you are using user foo (eg uid = 1234). If you load that user object<br>&gt;what you appear to asking for here is "when did that user login the time<br>&gt;before the last login?". That's rather odd functionality to expect of any<br>&gt;system except those that keep a record of every login time, forever.<br>&gt;-&gt;login is "the last time the user logged in" not "the last time the user<br>&gt;logged in before last".<br>&gt;<br>&gt;So, it seems your question and your responses to date have been a little<br>&gt;unclear.<br>&gt;<br>&gt;regards,<br>&gt;--Andy<br>&gt;<br>&gt;(ps, I'm trying to help ;)<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt;Need Mail bonding?<br>&gt;Go to the <br>&gt;<http: //answers.yahoo.com/dir/index;_ylc="X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&amp;sid=396546091">Yahoo! <br>&gt;Mail Q&amp;A for <br>&gt;<http:
 //answers.yahoo.com/dir/index;_ylc="X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&amp;sid=396546091">great <br>&gt;tips from Yahoo! Answers users.<br><br><br>--<br>-------------------------------------------<br>Openflows Community Technology Lab, Inc.<br>New York | Toronto | Montreal | Vienna<br>http://openflows.com<br>People are intelligent. Machines are tools.<br></http:></http:></drupal@f2s.com></blockquote><br><BR><BR><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><p>&#32;

<hr size=1>8:00? 8:25? 8:40? <a href="
http://tools.search.yahoo.com/shortcuts/?fr=oni_on_mail&#news"> Find a flick</a> in no time<br> with the<a href="
http://tools.search.yahoo.com/shortcuts/?fr=oni_on_mail&#news">Yahoo! Search movie showtime shortcut.</a>