Skip to:
Content
Pages
Categories
Search
Top
Bottom

Private Group Admission


  • kemmieg
    Participant

    @kemmieg

    I’ve seen my question, sort of, posted before with no resolution. I’m setting up a site for a karate class business and we are using Buddypress for each location. I’m using Gravity Forms for the registration and I’m trying to find out if there is a way to automatically enroll the registrant into a specific group based on the location they choose. I’ve seen plugins that will work using the native Buddypress registration but we are using Gravity Forms because there is payment involved and it’s a multi-part form. Before I use my second option, I’d like to know if there is some filter or action that would allow addition to a specific group during the registration process. Also, these are private groups because they will contain children’s information.

    Thanks

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

  • Anil Sharma
    Participant

    @anilktpss

    You can use something like this function

    
    function automatic_group_membership( $user_id ) {
     if( !$user_id ) return false;
     
     groups_accept_invite( $user_id, <# group ID #> );
    }
    add_action( 'bp_core_activated_user', 'automatic_group_membership' );

    Anil Sharma
    Participant

    @anilktpss

    you Can also check previous topic on this

    how to add new members to groups automatically?


    kemmieg
    Participant

    @kemmieg

    I need it to happen during the registration process when they don’t have a user ID and it needs to add them to the group based on a drop down field in Gravity Forms.


    Anil Sharma
    Participant

    @anilktpss

    This function is useful during the process of registration and need to fetch user ID and need pass to this function with group id

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