Just ignore what I said earlier. I wrongly assumed, based on the name, that a CSV file was just a list of values separated by commas. I missed that you posted the content of the file (probably because it looked like a comment).
The real problem is that when reading a string with the >> operator it will read until it finds a whitespace character, so name ends up with the value "user1,999". The easiest way to fix this problem is probably to use std::getline as integralfx said.