BuddyDev

Search

Help with syncing groups and roles

  • Participant
    Level: Initiated
    Posts: 20
    constantinos amiridis on #47091

    Hi

    need some help syncing some wp roles and groups

    The main goal is for my discord users to get a role throu our homepage

    The user will join a group on our homepage and i have made a type pro association with wp group to wp role

    Then i have another plugin that gives gives users that have the wordpress role x the discord role x

    but i think im doing something wrong, no users that joined those buddypress groups gets any roles

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #47099

    Hi,
    Thank you for purchasing from us.

    It seems you are trying to achieve the opposite of what this plugin does.

    The Member Type pro allows you to Map ‘member types’ to WordPress roles and also, if you want, you can associate some the groups with member types to be automatically assigned.

    What you are looking for seems to be like this:-

    1. each group has an associated WordPress role
    2. When a user joins a group by any means, we change the user’s role to that specific group’s associated role

    Is that a correct assumption? If yes, we can help with some snippet/a tiny plugin to achieve it. I just need to know which code/plugin are you using to assign groups to user on home page. Also, what
    happens if a user becomes member of 2 or more groups?

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 20
    constantinos amiridis on #47103

    great with snipet!!!!

    You are correct, totaly wrong of me regarding the type plugin.

    1. each group has an associated WordPress role – Correct

    2. When a user joins a group by any means, we change the user’s role to that specific group’s associated role. the user can be in multiple roles.

    The important thing is to match 1 group to one role.

    We are planing to use the buddy press own plugin

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #47118

    Hi,
    Thank you for the reply.

    We will create a plugin to allow you achieve it. I or one of my team member will write back by day end tomorrow with the plugin link.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 20
    constantinos amiridis on #47126

    Big thanks!

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2908
    Ravi on #47136

    Hello,

    Please download and activate the following plugin on your site:

    https://github.com/buddydev/bp-group-role/archive/refs/heads/master.zip

    This plugin adds a roles dropdown under Group > Settings page. You can set group associated role here and this role will be used when the user joins this group.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 20
    constantinos amiridis on #47137

    big thanks!!!

  • Participant
    Level: Initiated
    Posts: 20
    constantinos amiridis on #47138

    ravi: does the plugin even take away the role if a user leaves the group?

  • Participant
    Level: Initiated
    Posts: 20
    constantinos amiridis on #47139

    and, how does it work, tried with some users, the joined a new group and nothing happend 🙁

    i connected the groups with the roles already

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2908
    Ravi on #47141

    Hello,

    Sorry for the inconvenience. The plugin adds a setting under the group’s manage screen under the settings page. Check the following screenshot:

    https://tinyurl.com/28qcrejs

    Once you set the associated role for the group. It will be auto-assigned to the joining user on group joining. It will remove the old user role and set the group-associated role as a new role and Leaving the group plugin doesn’t do anything.

    Please let me know if you need further assistance.

    Regards
    Ravi

You must be logged in to reply to this topic.

This topic is: not resolved