'Mirrors the user\'s LDAP groups in the Django database and updates the
user\'s membership.'

def _mirror_groups(self):

    group_names = self._get_groups().get_group_names()
    groups = [Group.objects.get_or_create(name=group_name)[0] for group_name in group_names]
    self._user.groups = groups
