Solved. add-registration-field plugin was the culprit. An undefined field was added in the registration page causing the error in adding a user in the database.
alt text