Replies
Hi Brajesh,
thanks for your reply.Re-name filter and my code in functions.php look like:
add_filter( ‘login_redirect’, ‘bpdev_redirect_to_profile’, 11, 3 );
function bpdev_redirect_to_profile( $redirect_to_calculated, $redirect_url_specified, $user ){
if( empty( $redirect_to_calculated ) )
$redirect_to_calculated = admin_url();//if the user is not site admin,redirect to his/her profile
if( isset( $user->ID) && ! is_super_admin( $user->ID ) )
return bp_core_get_user_domain( $user->ID );
else
return $redirect_to_calculated; /*if site admin or not logged in,do not do anything much*/}
Unfortunately the result the same : /
Hi Brajesh,
thanks for your reply.I Inserted in functions.php code but unfortunately it
s doesn
t work : /
How can I find whats the reason is?add_filter( ‘bp_login_redirect’, ‘bpdev_redirect_to_profile’, 11, 3 );
function bpdev_redirect_to_profile( $redirect_to_calculated, $redirect_url_specified, $user ){
if( empty( $redirect_to_calculated ) )
$redirect_to_calculated = admin_url();//if the user is not site admin,redirect to his/her profile
if( isset( $user->ID) && ! is_super_admin( $user->ID ) )
return bp_core_get_user_domain( $user->ID );
else
return $redirect_to_calculated; /*if site admin or not logged in,do not do anything much*/}
I tried through the plugin the same situation.
http://wordpress.org/extend/plugins/bp-redirect-to-profile/Version BP is: 4.1.0