BuddyPress-Registration-Options icon indicating copy to clipboard operation
BuddyPress-Registration-Options copied to clipboard

Consider Gravity Forms integration.

Open tw2113 opened this issue 12 years ago • 1 comments

"If you are thinking about integrating BP Registration Options with Gravity Forms Registration Add On then a list of developer hooks and filters for the GF Registration Add On can be found at:

http://www.gravityhelp.com/documentation/page/User_Registration_Add-on_Developer_Docs

The one that looks particularly interesting is: gform_user_registration_add_option_group Used to add a group of options to the "Additional Options" section of the User Registration Feed. Useful when you want to add one or two options without requiring a whole section.

You could potentially add a BP Registration Options choice to the Gravity Forms Additional Options menu."

/**
 * GF Registration Process Set User to Not Authenticated to enable verification
*/

function gf_bp_profile_activation( $user_id ) {
    global $wpdb;

     //Update the user status to '69' which we will use as 'not activated' (0 = active, 1 = spam, 69 = not active)
    $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_status = 69 WHERE ID = %d", $user_id ) );

    if ( !is_multisite() ) {
        $activation_key = wp_hash( $user_id );
        $userdata = get_userdata($user_id);
        update_user_meta( $user_id, 'activation_key', $activation_key );

        if ( apply_filters( 'bp_core_signup_send_activation_key', true ) ) {
            bp_core_signup_send_validation_email( $user_id, $userdata->user_email, $activation_key );
        }
    }
}

add_action( 'gform_user_registered', 'gf_bp_profile_activation', 11 );

tw2113 avatar Nov 25 '13 18:11 tw2113

This will need updated for the refactored 4.2.0

tw2113 avatar May 06 '14 06:05 tw2113