-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
validation of unique email when creating a user #1715
Comments
This issue has been automatically marked as stale because there was no activity within the last 4 months (and it is quite a long time). It will be closed if no further activity occurs. Thank you for your contributions. |
I see that PR #1868 is merged. @TomasLudvik can you confirm that this Issue is already solved? |
It is because the PR is not merged into master yet. The issue will be closed when it is done. |
What is happening
What is wrong in code
The
UniqueEmail
constraint acceptsdomainId
parameter that is taken from the form's options. The problem is that admin can change the domain when creating a new user and hence the validation can fail on false positive result, or even worse, the validation may pass but the request fails on duplicate email exception.Steps to reproduce - scenario 1
admin/customer/new/
Steps to reproduce - scenario 2
admin/customer/new/
Expected result
UniqueEmail
constraint should not be probably used in the admin form at all. Instead, it is possible to useCallback
constraint where the submitted data (i.e. actually selected domain) can be accessed. It should look something like that:The text was updated successfully, but these errors were encountered: