FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » FUDforum 3.0+ » Controlling user access externally
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Controlling user access externally [message #22514 is a reply to message #22504] Sat, 05 February 2005 17:10 Go to previous messageGo to previous message
Ilia is currently offline  Ilia   Canada
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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Notice: Undefined index
Next Topic: Question regarding email support
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 02:45:34 GMT 2024

Total time taken to generate the page: 0.04738 seconds