Skip to content

Instantly share code, notes, and snippets.

@WebEndevSnippets
Created March 3, 2014 19:50
Show Gist options
  • Save WebEndevSnippets/9333164 to your computer and use it in GitHub Desktop.
Save WebEndevSnippets/9333164 to your computer and use it in GitHub Desktop.
Gravity Forms: Auto login to site after GF User Registration Form Submittal
add_action( 'gform_user_registered','we_autologin_gfregistration', 10, 4 );
/**
* Auto login to site after GF User Registration Form Submittal
*
*/
function we_autologin_gfregistration( $user_id, $config, $entry, $password ) {
wp_set_auth_cookie( $user_id, false, '' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment