Don't retrieve groups where user belongs. You cannot control user privileges using group information.