AjK,<br><br>Thanks for the deconstruction, it is very helpful for all of us. We should do that more<br>when things are ambiguous.<br><br><div><span class="gmail_quote">On 2/12/07, <b class="gmail_sendername">Carl Mc Dade</b>
<<a href="mailto:carl_mcdade@yahoo.com">carl_mcdade@yahoo.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
<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"</div></div></blockquote>
<div><br>Does visit here mean the last browser hit, or the last login time? <br></div><br>By "last" do you mean "the previous session prior to this one", or the "last access/login<br>in the present session". By session, I don't mean Drupal's session, but rather the "visit"
<br>as things like Google Analytics defines it.<br><br>If it is the "previous session" then it is tricky.<br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">"the time/date of the users last visit"<br><br>made available to a module when the user logs in.<span class="q"><br> <div> </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> </font></div></div></span><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;"><span class="q">----- Original Message ----<br>From: AjK <<a href="mailto:drupal@f2s.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
drupal@f2s.com</a>><br>To: <a href="mailto:development@drupal.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">development@drupal.org</a><br></span><span class="q">Sent: Monday, February 12, 2007 6:10:54 PM
<br>Subject: Re: [development] No last access?<br><br></span><div><span class="e" id="q_110b6fdbf31a3afd_5"><div>Carl,<br><br>> Nope,
That is updated first so their is no way of pulling<br>> the old time code before the newer on sets. This is the<br>> same problem as the access object. As matter of fact the<br>> login ia updated a split second before the access time.
<br>><br>> access = 1171296985<br>> login= 1171296984<br><br>OK, let's go back to basics.... here's your question again:<br><br>> Is there no longer a last access functionality?<br>> using the global user and calling $user->access
<br>> gives the value after the database has been updated.<br>> Not the value in the database at the time of login.<br>> Ex. the value in the database table is 0000002.<br>> You will not get this value but the value 0000003
<br>> which is the time of the latest access.<br><br>The ->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 ->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> "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> ->login which is timestamp at login<br> ->access which is timestamp at last browser hit<br>
<br>You want<br> ->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 ->login and ->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>->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></span></div></div>
<span class="ad"><br></span></div></div><span class="ad"><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" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Yahoo! Mail Q&A</a> for <a href="http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396546091" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
great tips from Yahoo! Answers</a> users.</span></div></blockquote></div><br><br clear="all"><br>-- <br><a href="http://2bits.com">2bits.com</a><br><a href="http://2bits.com">http://2bits.com</a><br>Drupal development, customization and consulting.