Hi
I want to check the emailaddress in ABPUsers if exist do come tticks related to my project where can I modify the code, because I found the CheckErrors() in CreateOrUpdateUser() function not clear CheckErrors(await UserManager.UpdateAsync(user));
6 Answer(s)
-
0
You can do your business logic before
UpdateAsyncmethods.CheckErrors(await UserManager.UpdateAsync(user));If my understanding is wrong, please explain your needs in detail.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
If I want to check the email address to update some field before UpdateAsync method, but then it will passing by CheckErrors function and it will return an error cz the email address already exist how can I remove this part from CheckErrors
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
I am waiting for your reply it's high priority
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi @nathaliewehbe
If I understand you correctly, you want to allow multiple users with same email address, is that right ? If not, could you explain it a bit more detailed ?
Thanks
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
I want to Modify Column in the user table when the user try to add same emailaddress instead of show him a message that the email already exist
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
You can override the
CheckDuplicateUsernameOrEmailAddressAsyncmethod of theUserManagerclass to make your business logic when the user's email address is duplicated.https://github.com/aspnetboilerplate/aspnetboilerplate/blob/1ba43bcda0c04a901c45eab43dd091ef668048df/src/Abp.ZeroCore/Authorization/Users/AbpUserManager.cs#L409
Please note: If no exception occurs, the update user's action will take effect.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)