I just solved problem number 1 this week (by calling bluehost- they fixed it for me over the phone in under 10 minutes), but am still having your same problem number two!
Any help??
There’s a small function floating around in the forum that should help you:
function oci_login_redirect($redirect_to, $set_for, $user){
$redirect_to = bp_core_get_userurl($user->id);
return $redirect_to;
}
add_filter('login_redirect', 'oci_login_redirect', 10, 3);
Just put that in your mu-plugins/bp-custom.php.
Credits goes to burtadsit.
I believe this is an outdated method. Is there a newer technique?
Arx Poetica did you find your answer?
@damainman this is an oldish thread and unlikely to provoke a response. did you have an issue/problem? If so them post a new topic as it will get a better response, having first searched the site as this particular issue may well have been covered more recently.
I got into same situation and found solution based on @jotem ‘s filter
You can use bp_core_get_userlink($user->id) instead of bp_core_get_userurl($user->id). But its lil bit tricky.
bp_core_get_userlink ($user_id) function returns anchor tag and echo it on the screen. So the login redirection process is halted .
Instead of that,
function rt_login_redirect($redirect_to, $set_for, $user){
$redirect_to = bp_core_get_user_domain($user->id);
return $redirect_to;
}
add_filter(‘login_redirect’, ‘rt_login_redirect’, 20, 3);
bp_core_get_user_domain() function will give the profile url without echoing anything.
One more important thing is priority in add_filter of login_redirect. Make sure that your function executes @ the last.
One more tricky situation is many time business logic is such a that the redirection process must be done depending on the type of the user. In that case, you have $user->id in rt_login_redirect(). Once you get the user_id, you can put business logic and modify $redirect_to according to your need!
P.S. Trying to echo any value in this function will give u output but the redirection process will not complete.
@Life2000
@arxpoetica @damainman @hnla Are you looking for same???