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. Link to comment https://forums.phpfreaks.com/topic/165247-solved-deleting-inactive-accounts/ 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 Link to comment https://forums.phpfreaks.com/topic/165247-solved-deleting-inactive-accounts/#findComment-871461 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 :/ Link to comment https://forums.phpfreaks.com/topic/165247-solved-deleting-inactive-accounts/#findComment-871476 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 Link to comment https://forums.phpfreaks.com/topic/165247-solved-deleting-inactive-accounts/#findComment-871548 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.