XF 2.2 $user.last_activity

Robert9

Well-known member
May someone explain me, how xf knows about my last_activity?
I have a list of two users. Both have (done with phpMyAdmin) the same value for xf_user.last_activity
I the template to show them i have something like: date($user.last_activity)
On my screen i read now:
user1: just now
user2: 33 minutes ago

So the last_activity to calc date($user.last_activity) is not the same like xf_user.last_activity.

From this i come to my real problem:

If i "find" users and sort them by xf_user.last_activity, but the date is calculated with another value,
then i have something like this:

user1: just now
user2: yesterday
user3: 33 minutes ago

but it needs to be:
user1: just now
user3: 33 minutes ago
user2: yesterday
 
I guess, that there is something in a session_table?
And after one hour, the value is deleted there, but moved to xf_user_last_activity?
Then my "finder" must do a left_join to that session_table?
 
Top Bottom