Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: redirecting to user domain using $bp


shaisimchi
Participant

@shaisimchi

i now have this which is your code:

function my_login_redirect($redirect_to,$redirect_to2,$user) {

global $bp;

$city = xprofile_get_field_data(26, $user->ID );
$state = xprofile_get_field_data(27, $user->ID );
$country = xprofile_get_field_data(103, $user->ID );
$zip = xprofile_get_field_data(23, $user->ID );

if( !empty($city) && !empty($state) && !empty($country) && !empty($zip) )

return ‘http://athleticrash.com’;

else

return bp_core_get_user_domain($user->ID) . ‘profile/edit/’;

}

add_filter(‘login_redirect’,’my_login_redirect’,100,3);

goes to the home page…

Skip to toolbar