How to get current user on a multi site that is using domain mapping?

I got it to work by first checking if the user was logged in using: is_user_logged_in().