Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Redirect to Profile for admin
Plugin Name: BP Redirect to Profile for Buddypress
Description:Redirect user to their profile when they login
Version: 1.1.1
Requires at least: BuddyPress 1.1
Tested up to: BuddyPress 1.2.8+WordPress 3.1
License: GNU General Public License 2.0 (GPL)
Author: Brajesh Singh
Author URI:
Plugin URI:
Last updated:16th feb 2010
Copyright (C) 2009 Brajesh Singh(
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see <>.
/*Add a filter to filter the redirect url for login*/
function bpdev_redirect_to_profile($redirect_to_calculated,$redirect_url_specified,$user){
/*if no redirect was specified,let us think ,user wants to be in wp-dashboard*/
//redirect all users
return bp_core_get_user_domain($user->ID );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment