• Resolved db0440954

    (@db0440954)


    Hello! I’ve created a custom registration page/form and here’s my question: I want the new subscribed users to have THE SAME active learndash groups THAN the current user who registrate the user (this page is locked to group leaders only)

    How can I achieve that ? Is there a plugin that I can use or can I code something in the plugin ?
    thanks for your help!

    • This topic was modified 6 years ago by db0440954. Reason: website restricted access
Viewing 1 replies (of 1 total)
  • Hello there,

    Adding the users to the groups does not seem to include on standalone Learndash plugin. It seems you are using the add-on for that. May be this? So, due to add-on not being readily available we could not provide you fully functional codes but you can get a hint from this pseudocode.

    You might use the provided hook user_registration_after_register_user_action after registering the user.

    function ur_add_user_to_group( $form_data, $form_id, $user_id ) {
        // Assign user to the group.
    }
    add_action( 'user_registration_after_register_user_action', 'ur_add_user_to_group' );
Viewing 1 replies (of 1 total)
  • The topic ‘Learndash front end user registration’ is closed to new replies.