Home »
FUDforum Development »
FUDforum 3.0+ »
Controlling user access externally
Re: Controlling user access externally [message #22514 is a reply to message #22504] |
Sat, 05 February 2005 17:10 |
Ilia
Messages: 13241 Registered: January 2002
Karma:
|
Senior Member Administrator Core Developer |
|
|
FUDAPI is stored inside a scripts/fudapi.inc.php all recent versions (as as 4-5 month ago) have it.
Group permissions are comprised of several tables
groups table -> stores group information
group_members -> stores members of particular group and their permission settings.
group_resources -> associates a group with 1 or more forums
group_cache -> cache table generated based on the data in the previous 3 tables. This table is what the forum actually uses to determine permissions.
The code for doing group permission manipulations can be found inside
groups.inc.t()
You have:
grp_delete_member() - delete group member
grp_update_member() - update group member
grp_rebuild_cache() - rebuild group cache
To Add a member you simply do something like this:
INSERT INTO fud_group_members SET group_members_opt=permissions_bit_mask, group_id=group_id, user_id=user_id.
Once you either add/update/delete group member you need to rebuild the cache. If you were working with just 1 person specify that account id to grp_rebuild_cache() to simplify the cache rebuild process.
The meaning of various bitmasks can be found inside group_perm_array() function of groups.inc.t
FUDforum Core Developer
|
|
|
Goto Forum:
Current Time: Wed Nov 27 22:11:16 GMT 2024
Total time taken to generate the page: 0.04040 seconds