Hi Paolo,
I have been trying to get this to work for a little while now.. but not so lucky.
Adding this bit of code to the functions.php I was able to get it to redirect to:
http://mysite/user_nicename/ while the profile is actually in http://mysite/members/user_nicename/
/*
Following Function Redirect the user to profile page after login
*/
add_filter(“login_redirect”,”bpdev_redirect_to_profile”,10,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(!is_site_admin($user->user_login))
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*/
}
(credits: https://codeofsandy.wordpress.com/2015/04/21/buddypress-redirect-user-to-profile-page-after-login/)
Can you help with this please?