Log in

View Full Version : Getting forumpermission from usergroupid/userid


TitanKing
07-11-2005, 04:57 PM
People I am so tired, I have tried absolutly everything, if anyone could help me I would be so gratefull and you will be my hero...

If I have a usergroupid/userid how do I get this:

Say I have a userid/groupid of say 5, this user has forumpermission of say forumid 10, 12, 16, 19

usergroupid 4 has forumid permission of 19, 21, 45, 66 etc...

Im sure there must be a simple solution, I cant figure out how on earth vbulletin stores forumpermission information...

Please help me... :nervous:

Marco van Herwaarden
07-11-2005, 08:31 PM
I guess the answer is, if i understand the question correct, forum permissions are stored with the usergroup, unless you have defined accessmasks for the user that override the usergroup permissions.

TitanKing
07-12-2005, 05:06 AM
Yes it lies in table forumpermission & usergroup, this is not the problem, it gets stored in some wierd 6 digit number, that is what I connot figure out, all I need is this...

usegroupid 7 has permission of forumid 3,9,12,15 etc...

Anybody please help me !

Marco van Herwaarden
07-12-2005, 06:08 AM
For each forum/usergroup you will find an entry in the forumpermission, unless the default usergroup permissions are used.

The 'forumpermissions' column is a so called bitfield. A bitfield is stored as an integer, and each bit represents a permission.

For example:
Permission A
Bit: xxxxxxxxxxxxx1
Decimal value: 1

Permission B
Bit: xxxxxxxxxxxx1x
Decimal value: 2

Permission C
Bit: xxxxxxxxxxx1xx
Decimal value: 4

If permissions A & C are on, but B is off, the decimal value for the permission field would be 5 (1 + 100 = 101 binary = 5 decimal)

TitanKing
07-12-2005, 06:50 AM
Man oh man oh man ! Your my Hero, im no gay person but ill freakin kiss you for this, thank you very much... damn dont know much about bits etc... but from here ill figure...

Thank you my friend !