Right now the same error code is returned for several types of database errors, the username already in use, and (if email verification is enabled) the email being undeliverable. These should all cause separate error messages.
The function is also super poorly written and is generally hard to read.
Right now the same error code is returned for several types of database errors, the username already in use, and (if email verification is enabled) the email being undeliverable. These should all cause separate error messages.
The function is also super poorly written and is generally hard to read.