Gravity Forms WPMU DEV Membership plugin

Hey all,

I followed the directions here –

to attempt to utilize Gravity Forms and Membership plugin together. The flow is correct when logged in. For example – if I am logged in as a user, use Gforms to create a new user (with registration add-on), it does in fact create the user, and then…based on my package selection confirmation redirect, takes me to the correct link.

Trying it as a visitor to the site (not logged in) after adding the snippet mentioned in the previous thread, which auto login’s the user, it instead sends me to the default registration page for membership plugin.

I am assuming the code snippet added to functions.php is off. Anyone else done this successfully? What is the code which should be added to functions.php? I have

add_action( ‘gform_user_registered’, ‘pi_gravity_registration_autologin’, 10, 4 );


* Auto login after registration.


function pi_gravity_registration_autologin( $user_id, $user_config, $entry, $password ) {

$user = get_userdata( $user_id );

$user_login = $user->user_login;

$user_password = $password;

wp_signon( array(

‘user_login’ => $user_login,

‘user_password’ => $user_password,

‘remember’ => false

) );