I have setup a cron job to delete users from my site if they are not verified within 24 hours of registration. The field registration_timestamp is stored as a timestamp and I also have a field called verified which is stored as a 1 or a 0. Here is the code for the cron job.
<?php ///connection stuff mysql_query("DELETE FROM users WHERE ((TO_DAYS(CURDATE()) - TO_DAYS(registration_timestamp)) >= 1) AND verified='0'"); ?>
I run the cron every five minutes and I checked on a dummy account I made to see if the user's account was deleted but it wasn't. Please can someone shed some light on what I need to do or what I have done wrong.
Here is the cron job in my cPanel
*/5 * * * * /path/to/my/script
I would really appreciate some help.