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
UpdateAsync
methods.CheckErrors(await UserManager.UpdateAsync(user));
If my understanding is wrong, please explain your needs in detail.
-
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
-
0
I am waiting for your reply it's high priority
-
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
-
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
-
0
You can override the
CheckDuplicateUsernameOrEmailAddressAsync
method of theUserManager
class 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.