Deleting Inactive Users Deleting Inactive Users
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Deleting Inactive Users

Started by blazer380, January 07, 2005, 08:34:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

blazer380

Is there a way to delete Inactive Users automatically if they don't register within 24 hrs?

Joachim Müller

no, such a mod hasn't been posted yet afaik.

Joachim

Nibbler

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.

blazer380

In 'some page' do you mean I can put that code into anycontent.php? and everytime that page loads, it will query the database?

Nibbler

Yeah, or just at the end of your include/init.inc.php would be neater.

blazer380

i put that code u gave me infront of ?> on init.inc.php. and when it works. Thank you very much!

ymca

Hi,
how many times the init.inc.php file is used?
i do not want to delete users that registered 10 minutes ago...

thnx

Sami

init.inc.php load every time you see gallery but that query will delete only users from 24 hours past ,nothing to worry  ;)
‍I don't answer to PM with support question
Please post your issue to related board

ymca

thnx...

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