Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Deleting Inactive Users  (Read 7462 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.035 seconds with 20 queries.