Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: redirecting to user domain using $bp


r-a-y
Keymaster

@r-a-y

Eek, you shouldn’t have to use $wpdb->get_var when there are a ton of template tags you could use like:

$city = xprofile_get_field_data( 26, $bp->loggedin_user->id );

Also you don’t need all those $has_field variables.

Just do a straight-out, also replace bp_core_redirect() with return:
if( !empty($city) && ..... )
return $redirect_url_has_location;

Also since you’re not using any of the passed variables, just use:
add_action('login_redirect','bp_location_redirect_to_page',100);

Skip to toolbar