Support » Plugin: Gravity Forms Directory » Autologin after registration for specific form

  • Hi
    I use the following code to autologin after user registration using the Gravity registration add-on.

    add_action( 'gform_user_registered', 'wpc_gravity_registration_autologin',  10, 4 );
     * Auto login after registration.
    function wpc_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' => true
        ) );

    I have 2 other forms that I use for registration purposes, but I don’t want to autologin after registering users through these forms.

    Is there any way to restrict autologin to a specific form’s ID?

Viewing 1 replies (of 1 total)
  • Thread Starter aminjabari


    Sorry, I have asked the question in the wrong place. I just wanted to delete the question, but there is no such option available.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.