Yes but it show the same value that I can retrieve from the database eg gallery => 3
I think that is something about "unserialize" but don't remember it. Have used it 5 years ago. Long time to remember it.
Yes but it show the same value that I can retrieve from the database eg gallery => 3
I think that is something about "unserialize" but don't remember it. Have used it 5 years ago. Long time to remember it.
Ah, okay...I wish I could help further but I have never "unserialized" the numeric permissions values to get a particular sub-permission.
Hopefully someone here knows, as I would also be interested in knowing how that works.
They're bitfields, not serialized values, so if you have the permission number for a group (and it could very well be 3), then you can check it by using
PHP Code:
if ($vbulletin->usergroupcache[12]['gallery'] & $vbulletin->bf_ugp['gallery']['vote']) { // they have vote permission }
I don't know if $vbulletin->usergroupcache[12]['gallery'] is right or not. It's not clear from what's posted above.
They're bitfields, not serialized values, so if you have the permission number for a group (and it could very well be 3), then you can check it by using
PHP Code:
if ($vbulletin->usergroupcache[12]['gallery'] & $vbulletin->bf_ugp['gallery']['vote'])
{
// they have vote permission
}
I don't know if $vbulletin->usergroupcache[12]['gallery'] is right or not. It's not clear from what's posted above.