• Resolved kexia

    (@kexia)


    This is a great plugin. However, I was wondering: Is there a way to enable the plugin to automatically add newly registered users to BuddyPress groups based on their answer to a question?

    For example, there’s a question that states, “What are your interests?” Each checkbox under the question should link to a BuddyPress group. If the new user who’s filling out the registration form checks three of those interest boxes, they should be added to all three BuddyPress groups.

    Is there any way to do this? Also, is there any way to automatically add them to a bbPress forum in the same way?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author easyregistrationforms

    (@easyregistrationforms)

    Hello @kexia,

    Thank you for contacting us. There is no such integration available with Buddypress. One has to use our hooks and write the code to assign user roles. I can share the hook details if you want. Let me know.

    Thread Starter kexia

    (@kexia)

    Yes, please what are the hooks and steps to do it?

    There’s another plugin called BuddyPress Registration Groups that adds a checkbox for each BuddyPress group to the regular BuddyPress registration page. How can I get it to add the checkboxes to the Easy Registration Form?

    Plugin Author easyregistrationforms

    (@easyregistrationforms)

    Our plugin calls an action just after user registration:
    do_action(‘erf_user_created’, $id, $form[‘id’], $submission[‘id’]);

    You can attach a function with the above to assign user role to the corresponding user. In the function, we are passing submission ID instead of submission object. So you have to load the submission data from ID into your function. example:

    $submission = erforms()->submission->get_submission($submission_id);

    Above submission array has registered user information along with other submission data.

    *Note:
    1. Above hook only called if the user account is created after registration. In case you are already logged in and submit the form, It won’t work.

    Regarding your other query, You can create simple checkboxes and can change the behaviour on the basis of selected values using the above hook.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Auto Add New Users To Groups And Forums Based on Registration Answers’ is closed to new replies.