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().

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)