changed the users publish function to return all users with ids