Notifications
Clear all

wpForo 1.x.x [Closed] Assigning Multiple Usergroup to a Single User

6 Posts
3 Users
0 Reactions
1,780 Views
Posts: 3
Topic starter
(@709298-summer)
Active Member
Joined: 3 years ago

Have anyone figured out a way to automatically populate user to multiple usergroups?

I've been using secondary group, but need a way to automate that as we been having user move for one business forum to another.  Here is the current setup:

 

Forum:  General, Usergroup: Subscribers

Forum:  Account, Usergroup: Accounting

Forum: Marketing, Usergroup: Marketing

Form: IT, Usergroup: IT

 

Users:

Jane belongs to Subscribers, IT and Marketing
Jonathan belongs to Subscribers and IT
Richard belongs to Subscribers and Accounting

Everyone by default is Subscribers.  However, as an admin, I have been going in to check off those secondary groups.  The pain comes in when staffs move around.  For example Jonathan took a position in digital marketing, so as an admin, we need to promptly add his access.  In Wordpress, user Roles gets updated automatically.  How can this be done in wpForo?

5 Replies
Robert
Posts: 10587
Admin
(@robert)
Support Team
Joined: 9 years ago
Posted by: @709298-summer

In Wordpress, user Roles gets updated automatically.

The main usergroup is changed when a user role is changed in WordPress. Just make sure the User Roles are synched with usergroups in Dashboard > Forums > Usergroups admin page.

You should have one user role synched with one user group, if the groups are more than one they'll not be synched. Please read the descriptions and notes in the Usergroup admin page.

Posts: 3
Topic starter
(@709298-summer)
Active Member
Joined: 3 years ago

I have double checked all the status is shown as synched in usergroup... ran the synch again after 100% complete.  It is still the same.  Jonathan in above scenario, is only shown as being in IT usergroup and not Marketing.

Here is my mapping:

Role: IT Usergroup: IT

Role: Accounting Usergroup: Accounting

Role: Marketing Usergroup: Marketing

Jonathan belongs to both IT and Marketing roles, but under Member tab, he is only listed as being in IT only.  I have to manually check off Marketing as secondary group in WordPress user tab.  Is there a way to automate this?  If user belong into multiple user group, the system automatically update user info with appropriate group and vice versa when user role is remove.

 

 

1 Reply
Moderator
(@martin)
Joined: 8 years ago

Support Team
Posts: 996

@709298-summer,

Please leave a screenshot of the Forums > Usergroups admin page.

BTW, if the role changing plugin doesn't use the standard WordPress hooks, then the wpForo Usergroup will not be automatically changed. wpForo functions are subscribed to WordPress hooks, and they work once the hooks are called by the plugin which changes the User Roles. If the plugin is not well codded, then there is no way to keep them updated synchronous. You issue requires very large debugging and deep checking. This is out of the free support for sure, so you will need to contact gVectors Custom Development Team via sales[at]gvectors.com email address and ask for paid help.

Posts: 3
Topic starter
(@709298-summer)
Active Member
Joined: 3 years ago

@martin @robert

Attached is screen shot of the usergroup and user role sync status.  User role sync is showing the correct member count but not usergroup.  

 

1 Reply
Robert
Admin
(@robert)
Joined: 9 years ago

Support Team
Posts: 10587

@709298-summer,

First, you should know that only the primary usergroups can be synchronized with user roles. Don't use secondary usergroups if the synchronization is important. All users should have one usergroups and that usergroup should be attached/synched with one user role:

 

wpForo synchronizes usergroups with user roles automatically if the user role changing process goes through standard WordPress functions, including the ‘set_user_role’ action hook. This is the correct and the only way to say other plugins that the user role is changed and initiate other processes like forum Usergroup synchronization. So you should contact the plugin support which changes the user roles and ask them whether they use the standard hook or not. If they don't use this hook, then there is no way to synchronize user roles with usergroups.

You can try the user role synchronization in Dashboard > Users > Edit User admin page. Just change a user role, and you’ll see the wpForo Usergroup will be changed automatically according to the synchronization rules.