Fabis94 Posted July 8, 2009 Share Posted July 8, 2009 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. Quote Link to comment Share on other sites More sharing options...
allenskd Posted July 8, 2009 Share Posted July 8, 2009 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 Quote Link to comment Share on other sites More sharing options...
Fabis94 Posted July 8, 2009 Author Share Posted July 8, 2009 I don't know how to do Timestamp checks :/ Quote Link to comment Share on other sites More sharing options...
allenskd Posted July 8, 2009 Share Posted July 8, 2009 I have done it once like a year ago but I forgot lol check out this thread should help you grasp how to do it http://www.phpfreaks.com/forums/index.php/topic,257920.0.html Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.