• Hi and thanks for your helpful plugin. πŸ™‚

    Log out not working, because there is not any nonce for log out links.
    The logout_url method of Theme_My_Login class is hooked to wordpress logout_url hook, but returned value of this method doesn’t has any _wpnonce argument.

    normal method :

    public function logout_url( $logout_url, $redirect ) {
    $logout_url = self::get_page_link( 'logout' );
    if ( $redirect )
    	$logout = add_query_arg( 'redirect_to', urlencode( $redirect ), $logout_url );
    
    		return $logout_url;
    	}

    .
    .
    Should be like this :

    public function logout_url( $logout_url, $redirect ) {
    $logout_url = self::get_page_link( 'logout' );
    if ( $redirect )
    $logout = add_query_arg( 'redirect_to', urlencode( $redirect ), $logout_url );
    
    $logout_url = wp_nonce_url( $logout_url, 'log-out' );
    
    return $logout_url;
    }

    https://ww.wp.xz.cn/plugins/theme-my-login/

The topic ‘Log out not working’ is closed to new replies.