Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author AITpro

    (@aitpro)

    You asked this question in this thread and you got it working before so follow the same steps. I am assuming this is actually a BuddyPress issue and not a BPS issue.
    http://wordpress.org/support/topic/plugin-bulletproof-security-bps-and-buddypress-logout-redirection?replies=5

    Thread Starter sweetmelody

    (@sweetmelody)

    I have followed the steps of the link above before I posted this thread. What can I do now? Many thanks.

    Plugin Author AITpro

    (@aitpro)

    When i log out of Buddypress i am redirected to the standard WordPress logout – example.com/wp-login.php?loggedout=true – BPS is not installed at all on the site i tested BuddyPress on. This is standard BuddyPress logout behavior and has nothing at all to do with BPS. So you will need to contact the BuddyPress folks about this.

    Plugin Author AITpro

    (@aitpro)

    Oops i forgot to configure my XAMPP vhosts file for the BuddyPress test site. the BuddyPress logout does redirect by default to the homepage with BulletProof Modes activated and without BulletProof Modes activated so BPS is not interfering with this on my test site. there must be something else going on with your particular website. in the other comment you posted add your website URL so i can take a look at your website and see if there is anything obviously wrong on the frontend. Thanks.

    Thread Starter sweetmelody

    (@sweetmelody)

    You are so right, the logout redirection has nothing to do with BPS. Here’s a link explains that by default, logging out from WP admin bar located above the header redirects users to the login page >>> http://patrick.bloggles.info/2012/01/24/automatically-redirect-to-current-page-after-logout-wordpress/ .

    Somehow, I wonder how it can redirect to the homepage instead to the current page.

    /*
     * Automatically redirect to current page after user logout WordPress.
     */
    function get_current_logout( $logout_url ){
      if ( !is_admin() ) {
        $logout_url = add_query_arg('redirect_to', urlencode(( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']), $logout_url);
      }
    
      return $logout_url;
    }
    
    add_filter('logout_url', 'get_current_logout');
    //add_filter('login_url', 'get_current_logout');

    I have tried to contact the author about the code but it seems that my comment can’t be sent. Do not why? πŸ™

    Tried to DIY by changing ‘get_current_logout’ to ‘get_home_url’, ‘get_home_url_logout’ and ‘get_home_logout’ but none of them work.

    The question is out of your plugin scope, you don’t have to answer if you are unwilling.

    Thank you!

    Plugin Author AITpro

    (@aitpro)

    Well since you have BuddyPress installed then this changes how you would do the redirect. i came across a plugin that will take care of this for you. it is specifically designed for BuddyPress logout redirection. If you want to do a DIY solution instead, then in your Google search term you should include “buddypress” example – “buddpress logout redirect”

    http://buddydev.com/plugins/bpdev-logout-redirect/

    Plugin Author AITpro

    (@aitpro)

    hmm interesting your logout by clicking the logout on the page works perfectly fine and redirects to your homepage, but yes i see that the wp-admin bar logout redirects to the default WP logout page. Ok so i think you actually need to do some custom DIY coding, but try the plugin above out and see if it will do this for you. if you decide to do a DIY then you need to also find a coding solution that is specific to the wp admin bar, since logouts from the page are redirecting normally. so the search term you would want to use is something like this – “buddypress admin bar redirect logout”

    Plugin Author AITpro

    (@aitpro)

    What is the status of this BuddyPress logout issue? Did you try the plugin above or find a DIY solution for BuddyPress?

    Plugin Author AITpro

    (@aitpro)

    Any luck with the bpdev plugin or did you find a DIY solution?

    Plugin Author AITpro

    (@aitpro)

    Since this issue/problem is not related to BPS then i am resolving this thread, but I will continue to assist you any way i can. You can continue to post new status updates or other info and i will continue to receive email notifications when you post. Thanks.

    Thread Starter sweetmelody

    (@sweetmelody)

    The bpdev plugin did help to redirect to the homepage but a black bar with redirect logout url would appear once the mouse pointer was hovered over the site background. Hence, decided to uninstall it.

    I believe that if I could find the DIV code to replace ‘get_current_logout’ then it’s a hurray but until now no successful case yet.

    /*
     * Automatically redirect to current page after user logout WordPress.
     */
    function get_current_logout( $logout_url ){
      if ( !is_admin() ) {
        $logout_url = add_query_arg('redirect_to', urlencode(( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']), $logout_url);
      }
    
      return $logout_url;
    }
    
    add_filter('logout_url', 'get_current_logout');
    //add_filter('login_url', 'get_current_logout');
    Plugin Author AITpro

    (@aitpro)

    I just did a Google search and i think i found the problem.

    OK.
    I have it running.

    I had to enable β€˜Show adminbar on the homepage’ in GenesisConnect Settings.
    This displayed the BuddyPress admin bar at the top of my homepage where I was being redirected on logging in. *Then* I was able to use the BuddyPress admin bar to log in to WordPress.

    This was very confusing.

    I kept expecting to go straight to the old WordPress admin area after logging in.

    http://buddypress.org/community/groups/installing-buddypress/forum/topic/cant-access-wordpress-admin-panel-after-bp-installation/

    If this is not the exact problem then what this post tells you is that yes there is a known problem with Genesis Connect and BuddyPress regarding the wp admin bar.

    Thread Starter sweetmelody

    (@sweetmelody)

    GOOD NEWS!!!

    Found this code and voila!

    add_filter('logout_url', 'logout_home', 10, 2);
    
    function logout_home($logouturl, $redir)
    {
    $redir = get_option('siteurl');
    return $logouturl . '&redirect_to=' . urlencode($redir);
    }

    Before the successful adventure, learnt from GC forum that the plugin had no interference on the logout redirection.

    Thank you so much for your light! Happy new week! πŸ™‚

    Thank you @sweetmelody! πŸ™‚

    Thread Starter sweetmelody

    (@sweetmelody)

    Glad it helped! πŸ™‚

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Plugin: BulletProof Security] Logout Redirection from WordPress 3.4.2 Admin Bar’ is closed to new replies.