Support » Fixing WordPress » WP 3.0 Login Logout redirect URL not working

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter finzend

    (@finzend)

    Never mind, I found the solution!

    It was because of the Domain mapping plugin; that one messes with the logout/redirects.

    I’ve adjusted that plugin and now it works.

    Case closed.

    Care to share how you fixed it?

    Thread Starter finzend

    (@finzend)

    Offcourse! Sorry I didn’t do that in the first place;)

    Go to domain_mapping.php
    Go to the function redirect_login_to_orig and replace it (or add the line with the redirect-if on logout)

    function redirect_login_to_orig() {
    	if ( !get_site_option( 'dm_remote_login' ) || $_GET[ 'action' ] == 'logout' || isset( $_GET[ 'loggedout' ] ) ) {
    		return false;
    	}
    
    	$url = get_original_url( 'siteurl' );
    	if ( $url != site_url() ) {
    		$url .= "/wp-login.php";
    		// finzend: make sure the redirect keeps working on logout?
    		if ( ($_GET[ 'action' ] == 'logout') && (!empty($_GET["redirect_to"])) )
    		  $url = $_GET["redirect_to"];
    		echo "<script type='text/javascript'>\nwindow.location = '$url'</script>";
    	}
    }

    Thanks!

    Great find, this has been bugging me for a while! Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP 3.0 Login Logout redirect URL not working’ is closed to new replies.