public static function getProfileOfUser($user){
        $profiles = $user->get_profiles_list();
        if (count($profiles) === 0 || $profiles[0]->isAnonymous()) {
            return null;
        } else {
            return $profiles[0];
        }
    }