How can i manage user permission? i need a fast method to manage users (accsess to a page or dont accsee to a page) when they login?
Please help me ...
How can i manage user permission? i need a fast method to manage users (accsess to a page or dont accsee to a page) when they login?
Please help me ...
You may want a simple solution but it's not a simple question.
At one end you could have individual permissions for each page for each user. That gives you a lot of flexibility but it would be an administrative nightmare. At the other end you could give users access or not to the whole site. Not very flexible but very easy to administer and code for.
The first is fine-grained. The second is coarse-grained. The whole point of finding an authorization scheme is to define one that is as fine or coarse grained as you need to balance flexibility and administration/development.
Two common schemes that may be of interest to you:
There are many, many variations upon these two and just as many alternatives. Various schemes can be combined.
This is why generic authorization libraries for me fall short because they have contrary needs of being broad enough to cover a large number of use cases and being coarse-grained enough to be useful for the individual user.
Implement an ACL system.
Choose a library you are comfortable working with. But the basic idea remains same.
You could also try this open source library for ACL implementation in your project.
PHPGACL => PHP Generic Access Control List.