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

Title: Deleting Inactive Users
Post 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?
Title: Re: Deleting Inactive Users
Post by: Joachim Müller on January 07, 2005, 11:24:40 am
no, such a mod hasn't been posted yet afaik.

Joachim
Title: Re: Deleting Inactive Users
Post by: Nibbler on January 07, 2005, 04:35:44 pm
Code: [Select]
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.
Title: Re: Deleting Inactive Users
Post by: blazer380 on January 07, 2005, 11:18:48 pm
In 'some page' do you mean I can put that code into anycontent.php? and everytime that page loads, it will query the database?
Title: Re: Deleting Inactive Users
Post by: Nibbler on January 07, 2005, 11:24:05 pm
Yeah, or just at the end of your include/init.inc.php would be neater.
Title: Re: Deleting Inactive Users
Post by: blazer380 on January 08, 2005, 12:14:31 am
i put that code u gave me infront of ?> on init.inc.php. and when it works. Thank you very much!
Title: Re: Deleting Inactive Users
Post by: ymca on May 30, 2006, 12:54:56 am
Hi,
how many times the init.inc.php file is used?
i do not want to delete users that registered 10 minutes ago...

thnx
Title: Re: Deleting Inactive Users
Post by: Sami on May 30, 2006, 12:59:06 am
init.inc.php load every time you see gallery but that query will delete only users from 24 hours past ,nothing to worry  ;)
Title: Re: Deleting Inactive Users
Post by: ymca on May 30, 2006, 01:03:28 am
thnx...

just 1 more thing to do is write the info to the user 24H limit :)
(basic thing for copp ;))