BP Redirect to profile Plugin :redirect Users to their profile on Login on buddypress sites
Jotted by Brajesh Singh in Buddypress, Buddypress Free Plugins, Plugins on November 28, 2009This is a free plugin for buddypress based sites, just a follow up from my earlier post about redirecting the user to their profile on login.
So What this plugin does
- Redirect a user to their profile, whether they login through yoursite.com/wp-login.php or any other page(In buddypress , we usually see a login box at all site pages
) - If site admin is logging in from front page of site, redirect back to front page.
- If site admin is logging from the site back end, i.e site.com/wp-login.php, send him to dashboard(wpmu dashboard)
If you have not yet read that article, read it here
http://buddydev.com/buddypress/buddypress-trick-redirect-users-to-their-profile-on-login/
Download The Plugin Here
Update: This plugin can be downloaded from the official wordpress plugin repository here and Now it supports Buddypress 1.2
http://wordpress.org/extend/plugins/bp-redirect-to-profile/
Please rate this plugin there. If you are giving a negative rating , Please let me know using wordpress.org forums why? what was the problem.
I will appreciate your feedback.
Direct Download Link: http://downloads.wordpress.org/plugin/bp-redirect-to-profile.1.1.zip
Installation
1.upload the plugin bp-redirect-to-profile to wp-content/plugins
2.Activate Sitewide and you are done. Easy!
Let me know if you get any trouble.
Have you checked our all new buddydev premium, It gives you access to all our premium plugins/themes and support forum for as low as $30, check out buddydev premium to find more.
Related posts:
- Buddypress trick:Redirect Users to their profile on login
- 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
- BP Flickr Plugin- Allow your users to show their latest flickr images on their BuddyPress profile
- Logout redirect plugin for wordpress Mu /buddypress
- Buddypress Profile Widget For Blogs

Hi Brajesh, this plugin does exactly what it is supposed to, but I noticed that it is overriding the title of my home page. I am getting Profile of as the title of my home page, instead of my site name. If I’m logged in as either an administrator or a normal user, the home page title still says Profile of with no name attached. If I go to the actual profile page, it fills in the name.
I would like to have my normal title on my home page. Any suggestions? I should also point out that I am using the SEO for BuddyPress plugin, which is successfully renaming the titles of all my other pages, except the home page. If I deactivate your plugin, the homepage title returns to normal.
Please let me know if you have a solution for this!
Thanks,
Mike
hi Mike
Thanks for the comment and pointing the issue.
I will try SEO for BuddyPress plugin with this plugin and will update you tomorrow. If it needs to be updated, I will update it.
Thanks
Brajesh
btw, you mentioned it in wrong post, and I inadvertently deleted this comment too, so I had to re create your comment from the DB .
[...] Put it inside your plugins/bp-custom.php or create a new php file and put this in mu-plugins folder. I Hope It helps. Note:Now there is a plugin for it, you can download it from here http://buddydev.com/buddypress/bp-redirect-to-profile-plugin-redirect-users-to-their-profile-on-logi... [...]
[...] http://buddydev.com/buddypress/bp-redirect-to-profile-plugin-redirect-users-to-their-profile-on-logi... [...]
[...] developed ,It as a complementary plugin for our another plugin which was used for login redirect,so went ahead and created this one [...]
Is there a way to have the redirection take you to the home page?
hi Alex, sorry, I missed this. I thought I answered it in another post somewhere. You need to use bp_get_root_domain() instead of bp_get_user_domain(). replacing will make it work.
Hi Brajesh,
Major code changes indeed in BP 1.2 stable. The plugin was working as advertised – redirecting to their profile pages – till I upgraded to BP 1.2 stable this morning. Now users get:
after they logged in.
Thanks.
hi Mercime
Thanks for Pointing. I am looking at the code and going to try it on Bp 1.2. I will put an update tonight
hi Mercime
here is a temporary solution
change this line
`add_filter(“login_redirect”,”bpdev_redirect_to_profile”,10,3);`
to
`add_filter(“login_redirect”,”bpdev_redirect_to_profile”,100,3);
`
We are delaying the call.
This should make it work.
Thanks
Brajesh
Bravo Brajesh, it’s working again. Three Cheers
Hey, I’m trying to get your plugin working, though having problems both with the plugin and hardcoded versions.
If I use the plugin, simply nothing happens. It activates but makes no difference.
If I code it myself as you direct, editing the bp-custom.php file, the site fails to load at all – just a blank screen, no errors.
Any ideas?
Thanks,
AJ
hi AJ
I am sorry to hear that.
Can you please specify which version of buddypress+wordpress/wpmu you are using.
that will help to diagnose the problem.
In bp-custom, you might have some syntax issues, that’s why site stops working, the plugin version should work.
That’s the exact problem I’m having…
MU 2.9.2.
BP 1.2.1
Activated sitewide and nothing and adding to bp-custom simply ‘whites’ the screens.
Ok… just tested the fix “add_filter(“login_redirect”,”bpdev_redirect_to_profile”,100,3);” in the bp-custom.php and worked!
Now on to redirecting to user activity stream.
@Berry
I am glad it worked. I will give it a try at my local and see why the updated plugin did not work for you.
And if you wanted to direct user to their Activity stream:
return bp_core_get_user_domain($user->ID).BP_ACTIVITY_SLUG;
and so on.
BTW…thanks for writing this script!
Hi brajesh I want to redirect the users to their activity page. And what more is when a logged in user try to access the homepage he is always redirected to his activity page. Is there any process?? Just plz send me. And say how is my site????
hi Soubhik
Please change line 35 to
return bp_core_get_user_domain($user->ID).BP_ACTIVITY_SLUG;
as pointed above by Berry.
Thanks
Brajesh
Hi Brajesh. Firstly, thanks for the great plugin – it’s exactly what I was looking for.
Secondly, I’m here to verify that the current version (1.1) of your plugin works flawlessly with WordPress 2.9.2 and BuddyPress 1.2.4.1.
Thanks once again for an excellent simple plugin that works!
Thanks Nathan for the comment and verifying it’s working with the recent version
But will it redirect all the users to their activity page who want to access the homepage????? I dont want to show the homepage to the logged in users. When they want to access the home they are just redirected to their activity.
Love this plug in. Thanks very much for developing it.
One question — or is it a request? Instead of redirecting to a members’ personal Activity page, is there a way to redirect them to the page showing their friend’s Activity?
This would be more along the lines of what Facebook does.
By the way, it is working fine on my install — WPMU 2.9.2 and BP 1.2.4.1. I modified an existing WooTheme (boy that has been a lot of fun!).
Hi Brajesh,
Great plugin and just what I was looking for. Except, I’d like to redirect folks after login to the Acivity page for their friends — just like Facebook.
Can you tell me what I would need to change in the code?
Thanks in advance!
Thanks for the comment Marty
change the line
return bp_core_get_user_domain($user->ID);
to
return bp_core_get_user_domain($user->ID).BP_ACTIVITY_SLUG."/friends";
That should make it happen.
It works, thanks!
how would i redirect to the current page? if logging in from any login form on the network, meaning sub blogs share the bp login form in the header. would like for the redirect to go to whatever the current page they are on.
hi nahum
please try this one
http://www.thinkinginwordpress.com/2009/12/tweak-your-buddypress-login-to-redirect-to-the-page-user-was-viewing-while-login/
it should work for your case.
you are awesome! thanks so much for this