Update function to get all users in database