Ok, so this one should be fun.
I have a product that adds usergroup permissions with the bitfields, all that fun stuff. Normally these would be accessible easily to determine a usergroup's permission on a standard vB page.
However, I need to find a way to get a usergroup's permissions for this custom bitfield group by user ID outside of vBulletin. Basically, I have an authentication script that gets a user ID or username, looks up the info for that user and determines if they have access, then returns a value back to the requesting script.
The permissions are saved in the "usergroup" table under a field called "sigmachatpermissions". How can I turn the number in that field into something usable? For example, setting the first five options to "yes" in the section's permissions gives me a number of 65566.
Any help would be appreticated!