• Resolved joelwolfgang

    (@joelwolfgang)


    Hey Nicu

    I’m getting a 500 error when I try to filter the no redirect message. I’m sure it’s something simple.

    I’m only getting it when I have the new ‘No Redirect’ filter hook in use. The moment I comment it out I get the new no redirect response.

    public function add_params_autologin( $response, $request ) {
    		$response['data']['test'] = 'test';
    		return $response;
    	}
    add_filter( 'simple_jwt_login_no_redirect_message', 'add_params_autologin' );
    

    thanks in advance.

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

    (@joelwolfgang)

    I just found your example code in the new readme file. Worked great!

    
    add_filter('simple_jwt_login_no_redirect_message',function($response, $request){
            $response['userId'] = get_current_user_id();
            $response['userDetails'] = wp_get_current_user();
            return $response;
        },10, 2);
    
Viewing 1 replies (of 1 total)

The topic ‘No Redirect Hook.’ is closed to new replies.