To replicate: Turn on PatronSelfRegistration set PatronSelfRegistrationDefaultCategory to a category code that doesn't exist. On the sample data, I used A. Try to register a borrower through the OPAC - everything will look like it worked, however the borrower will not be assigned a user.name - they cannot log in. Check in the staff client - the borrower was not created.
The original bug you are reporting doesn't seem quite valid anymore. Instead there is a different bug. It doesn't matter what you put in the PatronSelfRegistrationDefaultCategory because the OPAC form itself has a category field that sets the patron category. My opinion is that the PatronSelfRegistrationDefaultCategory should be changed to a dropdown with a list of the existing patron categories. If it is set to something, then the category field in the OPAC form should be removed and will be set to whatever is in PatronSelfRegistrationDefaultCategory. If it is empty, the user can select their category themselves (the current behaviour).
Actually, my mistake - this seems to be fixed now. If the input in PatronSelfRegistrationDefaultCategory doesnt match an existing category, the category list is still there and the patron is assigned the first one in the list. This doesn't seem to be a bug anymore. Setting to Resolved
I have added a patch to bug 17987 to make this syspref a dropdown menu selection