Jump to content

[SOLVED] Deleting Inactive Accounts


Fabis94

Recommended Posts

When on my site an account is created, in the DB a timestamp is saved in this format: YYYY-MM-DD

How do i create a script that deletes accounts that haven't been activated? Inactivated accounts are specified differently than activated so i just need to know how to make a check that checks if it has been (for example) 15 days since registration and if it isnt still activated then i delete it.

Link to comment
https://forums.phpfreaks.com/topic/165247-solved-deleting-inactive-accounts/
Share on other sites

You kind of answered you own question :)

 

Yes, there are two ways to delete accounts, either by checking the timestamps or identifying a boolean in a column (e.x "activated") so when you look up in the database, gather the "activated" column and the timestamped column and let logic do the rest

 

Now, if you want it to automatically check every.. 1 hour, look up for Cron Jobs

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.