Skip to content

Instantly share code, notes, and snippets.

@saeedsys63
Forked from WebEndevSnippets/functions.php
Created August 28, 2021 07:21
Show Gist options
  • Save saeedsys63/3bde31068c3b5f02801cb32ff25ea063 to your computer and use it in GitHub Desktop.
Save saeedsys63/3bde31068c3b5f02801cb32ff25ea063 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