Ticket #12297 (closed Bug: fixed)
Plone Administrator unable to edit User Data
|Reported by:||interra||Owned by:|
|Keywords:||Cc:||esteele, maurits, huub_bouma, dokter, khink, mr_savage, kcleong, vmaksymiv, kroman0, chervol|
When Use email address as login name option is turned on in Site-Setup/Security, Plone Administrators are unable to edit users’ data via @@firstname.lastname@example.org view with The email address you selected is already in use or is not valid as login name. Please choose another. error message.
Analysis revealed issue in plone.app.users package, in checkEmailAddress constraint that validates email field of IUserDataSchema. There are following cases when checkEmailAddress schema email field constraint lets form validate:
- Member is editing form herself and doesn’t change e-mail
- Member is changing e-mail to site-wide unique value
- Plone Administrator is changing e-mail to unique value.
Thus Plone Administrator can edit user’s Data only by changing e-mail each time form is being submitted.
The issue was reproduced in Plone-4.1.1 with plone.app.users-1.1.1. Fixes in plone.app.users-1.1.2 hadn’t touched the functionality in question.
I’ve included in CC those who influenced most the code in question. Pardon me if that was not welcome, please.