Support Forum

User Groups and Forum Access

SD Stan Dahl
Stan Dahl
Member

Hi,

I’m working on some custom API coding and have things working as intended.

However, upon examining the database, I see in the sfmemberships table that my test user now belongs to 2 usergroups.

The newest group being the one my custom programming just added them to.

And the original group which is defined as “No Forum Access”

When I login and view the forum on this user I am not seeing anything.

Should I be removing this usergroup assignment in this case?

3 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Whether a user can be in one or multiple user groups is controlled by the User Group settings under the ‘Map Users to User Group’ Admin option. Can I assume you have that setting turned off? Does that help?

SD Stan Dahl
Stan Dahl
Member

Yes, that was turned off – figured out what I was doing wrong – now it works.

is there a way I can check that that option via the API?

Also, what’s the difference between these 2 options?


MP Mr Papa
Mr Papa
Member

the difference is quite simple… if a user has a membership, and you add another membership (using the api vice direct db queries), if the single membership option is checked, all existing memberships are removed before the new one is added…

sorry, check what?  whether you have the single membership option check in your admin or not???  why would you need to check your site admin setting?  its forum wide, not user option… but, yes, you can query for the option if really needed.. something like this:

$sfmemberopts = sp_get_option(‘sfmemberopts’);
$single = $sfmemberopts[‘sfsinglemembership’];

then $single contains the state of the option…