I’m full of questions today
Okay, so I know you can set up a private forum, and you can bypass group permissions by manually adding a user to the private forum access list (via Forum > User Groups > Manage User Groups and adding a member to a user group’s “Selected” list) – but the key word is “manually”. You have to go in and add each person to the list yourself.
I’m wanting to write a function that hooks into this, so when a particular action is taken (i.e. someone purchases access to the forum), I can update the database table for the user group and add the user to it.
Is there already a hook I can tie into (or code somewhere that someone’s already done this with, or something similar) that will allow me to update that table? (I *think* it’s _sfmembers.user_id = _sfmemberships.user_id AND _sfmemberships.usergroup_id = _sfpermissions.usergroup_id AND _sfpermissions.forum_id = _sfforums.forum_id that maps the user to the forum through a group). I could use a WP custom select query to update the _sfmemberships table and add the member there (and I think that would be the only spot I’d need to add a row?) but if there’s already a hook or something in place for this, that would be great to know about