• Resolved eugenealegiojo

    (@eugenealegiojo)


    Hi,

    I have WP Forum pluigin installed. Once you’re logged in and you’ll press logout it will redirected to a page where it says ‘You are attempting to log out of SITE NAME’, Please try again. Instead of logging out automatically.

    Is this a bug or how do we changed the log-out redirection?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I get the same thing…

    Thread Starter eugenealegiojo

    (@eugenealegiojo)

    Suftstang,

    I’ve got if fixed by modifying the $logout_link value. You can found it under ‘/wp-forum/forum-functions.php’ file inside the function forum_redirect() around line 577.

    Here’s what I’ve done:

    From:

    function forum_redirect(){
    	global $page_id, $reg_link, $login_link, $logout_link ;
    	if(!$_SERVER['QUERY_STRING'])
    		$redirect = get_permalink($page_id);
    	else
    		$redirect = urlencode(get_bloginfo('wpurl')."/?".$_SERVER['QUERY_STRING']);/*get_permalink($page_id)*/
    
    	$reg_link 				.= $redirect;//get_bloginfo('wpurl')."/wp-register.php?redirect_to=";
    	$login_link 			.= $redirect;//get_bloginfo('wpurl')."/wp-login.php?redirect_to=";
    	$logout_link 			.= $redirect;//get_bloginfo('wpurl')."/wp-login.php?action=logout&redirect_to=";
    }

    To:

    function forum_redirect(){
    	global $page_id, $reg_link, $login_link, $logout_link ;
    
    	// changed the logout link since WP 2.7. Modified by Eugene A.
    	$logout_link = wp_logout_url( urlencode( get_permalink() ) );
    
    	if(!$_SERVER['QUERY_STRING'])
    		$redirect = get_permalink($page_id);
    	else
    		$redirect = urlencode(get_bloginfo('wpurl')."/?".$_SERVER['QUERY_STRING']);/*get_permalink($page_id)*/
    
    	$reg_link 				.= $redirect;//get_bloginfo('wpurl')."/wp-register.php?redirect_to=";
    	$login_link 			.= $redirect;//get_bloginfo('wpurl')."/wp-login.php?redirect_to=";
    	//$logout_link 			.= '';//$redirect;//get_bloginfo('wpurl')."/wp-login.php?action=logout&redirect_to=";
    }

    Notice the changes.

    Hope this would also help to someone who encountered the same issue.

    Regards,
    Eugene

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘You are attempting to log out… – a BUG?’ is closed to new replies.