mysql - Ease way for user permission function php -


We want to add 4 types (or groups) of users to our website, they should access only the associated pages, To create those groups we do, we should set an array of permissions, and if the user has permission to view this page or in any other way should be checked at the top of the page, like creating DB tables or writing classes. Please help. Normally I'm not a big fan of using Zend outside of Zend

The application, except Zend_Lucene, but I would recommend use in your application, which handles your work transparently to this task. It's easy to use, here's the sample code for Zend dev:
  $ acl = new Zend_Acl (); $ Acl- & gt; Adler (new zend_claw_roll ('guest')) - & gt; Adlerol (new zend_achel_roll ('member')) - & gt; Adrol (New Zend_Acl_Role ('Administrator')); $ Parents = array ('Guest', 'Member', 'Admin'); $ Acl- & gt; Adrol (new zend_click_roll ('some user'), $ parents); $ Acl- & gt; Add (New Zend_Acl_Resource ('someResource')); $ Acl- & gt; Reject ('guest', 'some resources'); $ Acl- & gt; Allow ('member', 'some resources'); Aclo $ acl- & gt; It's light ('some users', 'some resources')? 'refuse permission';   

Hope I can help, David

Comments