MyBB Community Forums

Full Version: Set users to innactive automatically
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
At some point in time I had a forum that automatically set anyone that hadn't posted in 30 days to innactive.  I don't remember for the life of me how I did this - and I am trying to set it up again so that it runs automatically once a day.  I've dug through my tasks list but I can't seem to figure out how I did it the last time.

Does anyone know how to do this?  I don't think it was a plugin, but it might have been?  Bearing in mind this was years ago that I had this..
I think the best way to do that would just be to create a task file and add a task to your forum to run.

$cutoff = TIME_NOW - 86400 * 30;
$update_user = array(
"away" => 1
);

$db->update_query("users", $update_user, "lastactive < " . $cutoff);