In the users directory, we keep a bunch of scripts to let users manage themselves (to some extent): users/signup.phpThis script lets a user signup for an account. Signing up for an account is a straight forward process. The user fills in their information, and selects a username and password. Note that in our validation function, we check to see that the user fills in all the required fields, and also that the username and email addresses do not already exist. If they do, the user will have to specify different ones. users/forgot_password.phpThe forgot password script asks the user for their email address and then looks up their user record in the database. If a user record is found, the user's password gets reset to some random word and then their new password address gets sent to their email address. This is why it is important that there are no duplicate email addresses on the system. users/change_password.phpA simple script to let the user change their password. users/change_password.phpA simple script to let the user change their settings. Note, we can't have the user changing their username (that's a big no-no!), firstname, or lastname.
blog comments powered by Disqus |