Writing a new feature for CakePHP 1.3, I want passwords to expire after x amount of days and at y days till expiration automatically change the password to a random string and email the user a new password or a login link. Is a crontab on the server the correct way? Or what about securich?
Share
cronjobs and securich are two very different things. The first one starts processes in defined intervals, or at given times. The second one seems to be a tool to manage the user privileges of a mysql-server. Obviously the second one doesn’t help you very much, because it were not the privileges of the server, that concerns you, but the passwords (etc) inside the database.
You can use a cron job for the clean up. This means, that you start a script in an interval of (lets say) 1 day, that goes through your user tables and does, what needs to be done. If the last password change were before x days send an email, if the last password change were before x + y days change the password and email the new one. Thus you need a new column
last_password_change_dateor something and the script needs to know, whatxandyis.