Skip to:
Content
Pages
Categories
Search
Top
Bottom

Can an xProfile field be used to auto add to group


  • dhsllc
    Participant

    @dhsllc

    Hi. I have a fresh install of BuddyPress 2.9.0 (and BBpress) on WordPress 4.8.1.

    I was able to customize the registration page to allow members to select their ‘identity group’ (teachers or students) with a radio button.

    What I am hoping to accomplish is to assign these members to a group based on their selection.

    I’m not sure how to do that. Help is appreciated.

    I did find 3rd party plugins with this one looking very promising: https://wordpress.org/plugins/buddypress-registration-groups-1/ but I’m hoping to avoid adding a bunch of plugins if this can be accomplished with the existing BuddyPress tools.

Viewing 2 replies - 1 through 2 (of 2 total)

  • Peter Hardy-vanDoorn
    Participant

    @petervandoorn

    As far as I know, there’s no way to do that with BuddyPress’ built-in tools.

    However, it is possible with plugins such as the one you identified.

    I had a similar requirement and ended up doing it by utilising BP’s Member Types functionality (which require a plugin or custom code to set up), a plugin called BuddyPress Xprofile Member Type Field to map that to an xprofile field (so that the user can change it herself… it was the easiest way I found to add that to the user’s profile, although there might be a better way), all tied together with custom code to patch in to the xprofile_updated_profile action to check what the change is and then use the groups_accept_invite() and groups_remove_member() functions to change the membership accordingly.

    I know that’s not very detailed, but due to lots of other functionality, such as adding to email lists, my code ended up being quite complex, so it’s not possible to paste it here.

    Hope that helps


    dhsllc
    Participant

    @dhsllc

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar