views:

64

answers:

2

Are there any PHP login scripts around that I can learn from?

I want to have a control panel that shows different options to different users depending on level of privilege.

+1  A: 

"Login" implies authentication. "Levels of privilege" implies authorization. Although they seem similar and are often discussed together as "auth", they are quite different. "Authn" is global and simply takes in a username and password, or auth token, etc. "Authz" must be implemented at an object level and is more complicated; consider using a framework that supports it natively.

Ignacio Vazquez-Abrams
any particular frameworks in mind?
Moshe
Not in particular. Google finds Symfony, Yii, Lion, and more.
Ignacio Vazquez-Abrams
A: 

Yes, there are thousands of PHP scripts around that you can read and learn from.

You are welcome to download the framework MCRwebapp from Google Code and read the AbstractApp class to see both authentication (user password) and authorization (user permissions).

Don
Is that your script?
Moshe
Yes, it is a framework that I wrote and maintain.
Don
Ok, thanks. I'll try it out. Great to see people showing off their work. (BTW, I assume that you are willing to support it on some level if your suggesting it...)
Moshe
I downloaded it ans couldn't extract it in Ubuntu 9.04... Can you get it to me as a zip? [email protected]
Moshe
Use this command on Ubuntu or any Linux: tar jxvf webapp.tar.bz
Don