forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: blazer380 on January 07, 2005, 08:34:23 am
-
Is there a way to delete Inactive Users automatically if they don't register within 24 hrs?
-
no, such a mod hasn't been posted yet afaik.
Joachim
-
db_query("DELETE FROM {$CONFIG['TABLE_USERS']} WHERE user_active = 'NO' AND user_regdate < NOW() - INTERVAL 24 HOUR");
That's the query, just put it in some page to trigger the deletion.
-
In 'some page' do you mean I can put that code into anycontent.php? and everytime that page loads, it will query the database?
-
Yeah, or just at the end of your include/init.inc.php would be neater.
-
i put that code u gave me infront of ?> on init.inc.php. and when it works. Thank you very much!
-
Hi,
how many times the init.inc.php file is used?
i do not want to delete users that registered 10 minutes ago...
thnx
-
init.inc.php load every time you see gallery but that query will delete only users from 24 hours past ,nothing to worry ;)
-
thnx...
just 1 more thing to do is write the info to the user 24H limit :)
(basic thing for copp ;))