in reply to delete single user
Let's do this on paper:
- Write down a list of everybody in the room.
- Send one person out of the room.
- Announce all the names on the list.
Notice I didn't include a step to draw a line through the name on the list of the person we sent out of the room? You are deleting a user, but then printing out the list that you generated before the delete.
The order should be:
- Delete a user.
- Fetch a list.
- Print the list.
That's still a terrible plan; as the user list grows so will your memory requirements, network traffic, and the requirements for memory in peoples' browsers.