refs #6672 fixes bug when username contains underscore