O'Reilly logo

PHP 5 Social Networking by Michael Peacock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Authentication with our authentication object

With our user authentication object in place in our registry, we are now able to link into this to determine whether the current user is a logged in user, or not, and if they are we can also log them out.

Logging in

One of the first things our framework should do, once it has connected to the database, is perform authentication checks. This should do one of two things; it should either check the current user's session data to see if we potentially have a user who is already logged in. If this is the case, it should perform checks to see if they are a valid user, and build up the user object as appropriate. If this is not the case, it should check to see if certain form fields have been submitted (such ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required