Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Gravity Forms Auto login after registration successful.
- */
- add_action( 'gform_user_registered', 'hrx_bigshot_registration_autologin', 10, 4 );
- function hrx_bigshot_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
- ) );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement