How to redirect to default homepage after users sign in

I received the code below from Saji, one of the support people, but it isn't working. The feature I am looking for is to have users who sign into a site from my multi-site to go directly to the default homepage of that site. Here is the code:
function go_to_primary_blog($redirect_to, $request, $user){
$user_info = get_userdata($user->ID);
return get_blogaddress_by_id($user_info->primary_blog) . 'wp-admin';
add_filter("login_redirect", "go_to_primary_blog", 999, 3);