[thelist] looking for good php auth/perm class

Andrew Kamm akamm at demicooper.com
Wed Feb 22 08:43:27 CST 2006

> Does anyone know of any quality PHP classes/frameworks that specialize
> in session-based authentication, permissions management, etc.?

I second the recommendation for Pear::Auth. It's easy to implement if you
just want something very simple, but I've also been able to use it in more
complex situations, including managing multiple areas that require separate
authorization. Since it's actually a Pear package, you can feel pretty
comfortable with the stability/quality.

You'll need to do some extra coding if you want a 'remember me' function of
some sort.

You may also need to write some code to manage specific properties of a user
(like permission level), but Auth does all the hard work for you. You can
easily convert a logged in user to one of your own 'user' objects and
access/query whatever property you want.

Here's an example that uses the "getUsername()" method of the Auth class. It
converts a logged in Auth user to one of your own user objects and access
the user properties.

$userObject = new myUser($admin->getUsername()));



More information about the thelist mailing list