Advertisement
verygoodplugins

Untitled

Jul 9th, 2019
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. add_action( 'gform_user_registered', 'vc_gf_registration_autologin',  10, 4 );
  2. function vc_gf_registration_autologin( $user_id, $user_config, $entry, $password ) {
  3.     $user = get_userdata( $user_id );
  4.     $user_login = $user->user_login;
  5.     $user_password = $password;
  6.  
  7.     wp_signon( array(
  8.         'user_login' => $user_login,
  9.         'user_password' =>  $user_password,
  10.         'remember' => false
  11.  
  12.     ) );
  13.  
  14.     if( function_exists( 'wp_fusion' ) ) {
  15.         wp_fusion()->user->get_tags( $user_id );
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement