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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.