Skip to content
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

EmailConfirmed and PhoneNumberConfirmed are set to false after updating a user #2140

Closed
gdlcf88 opened this issue Nov 11, 2019 · 5 comments · Fixed by #2203
Closed

EmailConfirmed and PhoneNumberConfirmed are set to false after updating a user #2140

gdlcf88 opened this issue Nov 11, 2019 · 5 comments · Fixed by #2203
Assignees
Milestone

Comments

@gdlcf88
Copy link
Contributor

gdlcf88 commented Nov 11, 2019

When updating a user with identity-management, if user's EmailConfirmed and PhoneNumberConfirmed dont change, should them keep original value?

private async Task UpdateUserByInput(IdentityUser user, IdentityUserCreateOrUpdateDtoBase input)

@hikalkan hikalkan added this to the 1.1 milestone Nov 16, 2019
@hikalkan
Copy link
Member

@maliming can you test this and fix if there is a bug please?

@maliming
Copy link
Member

This is actually the design of the Identity.
https://github.com/aspnet/AspNetCore/blob/bfec2c14be/src/Identity/Extensions.Core/src/UserManager.cs#L1389

@gdlcf88
Copy link
Contributor Author

gdlcf88 commented Nov 18, 2019

What if dont set the un-changed Email/PhoneNumber value for keeping their confirmed status?

(await _userManager.SetEmailAsync(user, input.Email)).CheckErrors();

@maliming
Copy link
Member

You can override the related methods. I will take the time to figure out the design logic of identity.

@maliming maliming modified the milestones: 1.1, backlog Nov 18, 2019
@maliming
Copy link
Member

Well, maybe we should not call the SetEmailAsync method if the email has not changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants