Viewing 1 replies (of 1 total)
  • Thread Starter siganos1x

    (@siganos1x)

    I sorted out this problem by changing in the wp_cassify_utils.php , function wp_cassify_auth_user_wordpress at line 255 :
    do_action( 'wp_login', $user->user_login, $user );

    previous was :
    do_action( 'wp_login', $user->user_login );

    So now the complete function is:

    public static function wp_cassify_auth_user_wordpress( $cas_user_id ) {
    		
    		if ( username_exists( $cas_user_id ) ) {
    			$user = get_user_by( 'login', $cas_user_id );
    
    			wp_set_current_user( $user->ID, $user->user_login );
    			wp_set_auth_cookie( $user->ID );
    			
    			do_action( 'wp_login', $user->user_login, $user );
    		}
    		else {
    			die( 'User account does not exists in WordPress database !');
    		}
    	}

    Please check if this is a valid solution and if it is please include it in a future update, thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Integration with WooCommerce’ is closed to new replies.