In this tutorial I will show you how to create a login form which validates the user with the database and do some basic security to redirect people who try to access a protected page. I’ll go over Flash messages to show the user some information which will last for one request.
In this tutorial I’ll be covering
- Create a login form via FormHelper
- Retrieve data from the database via automagic functions (ooooooh magic!)
- Use sessions to check if a user is logged in
- Use Flash messages to inform the user
- Check out the AppController and callback functions
This part is the follow-up on what we have seen in part 2 of my CakePHP basics serie!
Let me know if you enjoyed it! Happy coding!