Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $permissions = array (
- 'moduleAjouter' => array (
- 'general' => 1,
- 'admin' => 2,
- 'BigBoss' => 4
- ),
- 'moduleModifier' => array (
- '...' => 1,
- '...' => 2,
- '...' => 4
- )
- );
- if ($user->hasPermission($moduleAjouter['general']))
- {
- // affiche XXX
- if ($user->hasPermission($moduleAjouter['admin']))
- {
- // Affiche du surplus
- if ($user->hasPermission($moduleAjouter['BigBoss'])
- {
- // Affiche le truc du big boss..
- }
- }
- }
Add Comment
Please, Sign In to add comment