Last Login

Submitted by Anonymous on Fri, 03/20/2009 - 20:19
Written by
William

Just wondering if last login time could easily be as whats in the screenshot when hovering a user, time updates as you navigate the forum. Thanks.

Would help to add screenshot. :lol:

It already is like this. :) Or what do you mean?

If you press F5 while in profile last login time remains the same as when you logged in, time for viewing detailed who's online list updates when you press F5 along with hovering a user in who's online.

that is the point of 'last login'

do you mean
'last active' so when a user clicks onto a new page it updates it

you could add this to the page_foot.php

//
//Update last click
//
$db->query("INSERT INTO ".TABLE_PREFIX."members (last_click) VALUES ('".time()."'");

kk now i reli must go b4 my manager relises :S

Last login is just that, last time you logged in, you can be on 12 hours straight and it does not change till you log out and log back in.

I would like last visit, but this is just an inquiry, it is not a priority for change, because I can wait for UseBB 2.

im back home now ill see what i can do at school tomoro im nackred now


//
//Update last click
//
$db->query("UPDATE ".TABLE_PREFIX."members SET
lastactive = ".time().",
WHERE id = ".$session->sess_info['user_info']['id']);

woops i just relised what i posted :oops: :roll: :P

The users table already has a field for the timestamp of the last pageview, so there's no need to add in extra code. For the next bugfix release I will add an extra template variable so the information can be used in the profile template.

Thanks Dietrich, I should have said "its good enough now" instead of waiting for v2.