Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Deleting Inactive Users  (Read 7443 times)

0 Members and 1 Guest are viewing this topic.

blazer380

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
Deleting Inactive Users
« 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?
« Last Edit: January 08, 2005, 05:09:28 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Deleting Inactive Users
« Reply #1 on: January 07, 2005, 11:24:40 am »

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

Joachim
Logged

Nibbler

  • Guest
Re: Deleting Inactive Users
« Reply #2 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.
Logged

blazer380

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
Re: Deleting Inactive Users
« Reply #3 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?
Logged

Nibbler

  • Guest
Re: Deleting Inactive Users
« Reply #4 on: January 07, 2005, 11:24:05 pm »

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

blazer380

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 40
Re: Deleting Inactive Users
« Reply #5 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!
Logged

ymca

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 79
Re: Deleting Inactive Users
« Reply #6 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
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: Deleting Inactive Users
« Reply #7 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  ;)
Logged
‍I don't answer to PM with support question
Please post your issue to related board

ymca

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 79
Re: Deleting Inactive Users
« Reply #8 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 ;))
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.