In a multisite setup, when users are visiting a blog/site that is not theirs, I would like to display a link to "Visit My Blog" that takes them to that users "primary" blog.
I am using WP 3.5 with buddypress installed.
Currently I am using this:
<a href="<?php $blog = get_active_blog_for_user( get_current_user_id() ); $blog_url = $blog->domain?>">Visit My Blog</a>
But this brings me to the users buddypress profile (domain.com/members/user) not their blog (domain.com/user).