XF 2.1 How can I change the date of all users' last activity to the date of their last post in the database?

Rom

Active member
If I wanted to change the date of all users' last activity to the date of their last post in the database, is there a PhpMyAdmin query I can use to do this? Thanks for any help or info. Sorry if this is the wrong forum. Wasn't sure where to post it.
 
Last edited:
Why do you want to do that?

Last post time is not necessarily last activity time.
yes I know, but I used a buggy add-on that ignored the parameters of which user groups to use and which not for Members Currently Online padding, so I have lots of very old users that have the same "last activity" date, a few of them actually passed away years before (I have a lot of elderly users on my forum). I know I can never get back their "true" last activity date so the next best thing is their last post date. it's really important that I fix this in some way. Thanks for any help @Brogan
 
You could write a small php like:

fetch all users where last_activity < long time ago;
fetch the last post of this user and its post_date, set last_activity of user = post_date of last post;

Should be done in minutes.
 
Hey @Rom ,

Do you still need a tool like this? I can try to create an open source program that takes a database user and password and then lists all the affected users and their new last activity date and the source of the activity and an apply button when satisfied.
 
Top Bottom