So, your site is getting more and more popular, and you want to make it more flexible for your users to access certain parts of the site - but, you want to restrict access to others. That's all well and good, but with most of the tutorials out there, you just get one login, and one set of access rights - everyone gets everything. Well, Zend hopes that it's latest tutorial will help you with creating those user access levels on your site.
In Creating an Authentication System with Privilege Levels using PHP (there's a mouthful), the author starts off with making sure you know what you're doing - in working with cookies, mysql and md5 hashes. Those are the basis for his code. From there, it's on to some definitions of key terms, and right into the database structure. The basic idea is that each person gets an "auth_level" which everything is based off of.
When they move on to the code, things get interesting. They show you simply how to get the user's information and store it so that each of the following pages know what access rights that user has. It's a simple system (trust me, I've seen more complex) for adding additional rights for users, but it's usually the simple solutions that are the best...




