Close We have just updated BuddyDev for better performance. If you note a glitch, please let us know by using the feedback button on the left.

BuddyDev

Logout redirect plugin for wordpress Mu /buddypress

Jotted by Brajesh Singh in Buddypress, wpmu plugins on November 30, 2009
30th Nov

hi again :)
I am glad to introduce our another free plugin “bpdev logout redirect” for wordpress Mu and Buddypress.

So what It does

  • For WPMU, redirect users to main site, when they logout
  • For buddypress, if the user is logged in at back end, he will be redirected to the front page of the site on which buddypress is enabled. For the user not logged in backend, buddypress already redirects them to main site on logout.

So, It is basically a simple plugin, allowing you to redirect your user to the main site while they logout.

I have used the filter “logout_url” to manipulate it, anyway, It was just a few lines of code.

Download Link

Please download it by clicking on the right side download icon .

[drain file 17 show]

Installation

1.Unzip the plugin bpdev-logout-redirect.zip
2.Upload it to wp-content/plugins
3.Go to Dashboard->Plugins->Installed
4.Activate BpDev Logout redirect  Sitewide

That’s it.

Hope It helps.

Let me know in comments whether it worked for you or not or if you found any problem.

0saves
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Related posts:

  1. BP Redirect to profile Plugin :redirect Users to their profile on Login on buddypress sites
  2. Plugin BP Auto activate Auto Login-redirect to profile, automatically activate your new user signup, log them in and redirect to their buddypress profile on signup
  3. Buddypress trick:Redirect Users to their profile on login
  4. Stealth Mode for Buddypress Site Admin Plugin
  5. Set default theme for the Newly Created blogs on your wordpress MU/buddypress Site

14 Responses to Logout redirect plugin for wordpress Mu /buddypress

  • This plug in worked like a charm and did exactly what I needed. Thank you very much!

  • I uploaded and activated the plugin, and after that my adminstrations sit just turned whrite. So now I can’t do anything. I can not even remove the plugin again. What can I do?

    • Daniel
      This plugin should not cause any issue with bp 1.2. I had updated it for bp 1.2.

      Still, you can simply delete the plugin using ftp, delete it from wp-contents/plugins and it will be automatically deactivated.

      I will be interested to know, what caused the conflict.

      Thanks
      Brajesh

  • Hello!

    Thanks for all the great plugins!

    Question. How can we modify your plugin so when they hit logout they get redirected to a logout page or at least a message is set on the home screen saying its logged out?

    Thank you!

    • hi Giovanni
      add a line after line 33 and before 37 as

      $redirect="where you want to redirect";

      Also for showing a message, you will need to add another line at the bottom(just before return statements ass)

      bp_core_add_message("You have logged out successfully");

      Make sure the line
      do_action( ‘template_notices’ );
      is present on the page where you are redirecting user after logout .

  • I had some privacy plugins with buddypress but when a user logged in and then logged out, everything was still viewable if the page wasn’t refreshed. Imagine this on a public computer. I found your plugin and put it in my ftp. It didn’t show up in my admin to activate but it still works. Clicking logout anywhere now redirects to the login. Cool.

    • Hi Stacy,
      Thanks for the comment.
      I am glad it is working for you.
      It seems to me, you have uploaded the plugin to the mu-plugins directory, so It is automatically activated sitewide.

  • I noticed this plugin was last updated in 2009 – is this plugin compatible with WP3.1 and BP 1.2.8?

    • Hi Miko,
      As far as I tested, It worked. Since there is a very small code and nothing change during the bp updates, so I did not updated this plugin. It should work without any trouble.

  • Hi Admin !
    When i’m trying what you said about redirecting to a personnal page, that doesn’t work.
    I put the like as following :

    $args = array( ‘action’ => ‘logout’ );
    if ( !empty($redirect) ) {
    $args['redirect_to'] = $redirect;
    $redirect=”http://bl.ee/mypage”;
    }

    and add

    in the page

    What’s wrong ?

    Thank you very much,

    Mathieu

  • Sorry, Could you delete my last comment ?
    I talked about
    do_action( ‘template_notices’ );

  • Hello

    I would like to say this is a great plugin and I love using it. It worked fine with my older version of bp. However, I just recently upgraded and it has not been compatible. Apon activating the plugin, I would get this error message:

    Plugin could not be activated because it triggered a fatal error.

    Fatal error: Cannot redeclare bp_login_redirect() (previously declared in /home/vsouq/public_html/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php:233) in /home/vsouq/public_html/wp-content/plugins/buddypress-login-redirect/bp-login-redirect.php on line 97

    Is there a way to fix this?

    Thank you,
    Virtual Souq

Leave a Reply

Your email address will not be published. All the fields marked as * are required.


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>