autoprune users

Started by rickandmary, July 20, 2012, 01:44:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Delete's user accounts not used within x amount of time, set to your own preference.

add to cleanup.php

//delete inactive user accounts
$secs = 42*86400;
$dt = sqlesc(get_date_time(gmtime() - $secs));
$maxclass = UC_POWER_USER;
mysql_query("DELETE FROM users WHERE status='confirmed' AND class <= $maxclass AND last_access < $dt");