I would use array
$user_perm ( 1 = false, // for admin
2 = true // for news
4 = true // news_create
8 = false // news_delete
.
.
.
)
as you can see there are gaps that you can use for other permissions,
and this way all you need is to rewrite
if($user_perm $perm == $perm )
to
Hello
I have some trouble with user permission.
I build the system like the permission in the phplib.
admin = 1
news= 2
news_create = 4
news_delete = 8
.
.
.
then ich can check ($user_perm $perm == $perm )
But the problem ist that the permissions now over BIGINT.
So i
2 matches
Mail list logo