Details
-
Enhancement
-
Status: Closed
-
Should
-
Resolution: Fixed
-
None
-
None
-
None
-
Low
Description
In OpenMRS 2.2, a new "email" property was added to User. In the database, this is setup as a unique field on the users table. See:
However, there is no corresponding validation of this in the UserValidator. This results in error messages similar to: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'test@test.com' for key 'email', rather than an actual validation exception.
Either the unique constraint should be removed from the users table, or additional validation should be added to the UserValidator to enforce it prior to saving.