Advertisement
verygoodplugins

Untitled

Nov 11th, 2018
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. /**
  2. * Auto login to site after GF User Registration Form submission
  3. */
  4.  
  5. function we_autologin_gfregistration( $user_id, $config, $entry, $password ) {
  6.     wp_set_auth_cookie( $user_id, false, '' );
  7.     wp_fusion()->auto_login->end_auto_login();
  8. }
  9.  
  10. add_action( 'gform_user_registered','we_autologin_gfregistration', 10, 4 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement