Follow the instructions in the comment on the linked question. It starts "Open qa-app-users-edit.php for edit".
Then instead of where it says:
preg_match('/admin|moderator/', $handle, $matches)
You would put:
preg_match('/^[a-zA-Z0-9_]+$/', $handle, $matches)