Adding implementation of getting groups from users.