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

[ENH] Allow IUserManager.UpdateUser method to set EmailConfirmed on identity user from same on User object (as IUserManager.AddUser method does) #4249

Closed
lanthonyneville opened this issue May 10, 2024 · 0 comments

Comments

@lanthonyneville
Copy link

lanthonyneville commented May 10, 2024

Oqtane Info

Version - 5.1.1
Render Mode - N/A
Interactivity - N/A
Database - N/A

Describe the bug

When programmatically creating a user via IUserManager.AddUser, the EmailConfirmed property can be set to True on the User object, and this is transferred to the identity user object (such that the user can log in without going through a manual email verification).

Given this, the expectation is that updating a user programmatically via IUserManager.UpdateUser, the EmailConfirmed property on the User object can be set to True/False, and again this will be transferred to the identity user object.

Having this ability (to set/clear the EmailConfirmed property) is useful for when creating a custom login module (see 4220) where the external authentication provider controls most of the auth checks on the user.

Expected Behavior

As with IUserManager.AddUser, IUserManager.UpdateUser should transfer EmailConfirmed property changes to the identity user.

Anything else?

I know there are ways to accomplish the same result using other methods. This is just a question of expectations and consistency - if AddUser allows control over the EmailConfirmed property, then why doesn't UpdateUser ?

@lanthonyneville lanthonyneville changed the title [BUG] IUserManager.UpdateUser method does not set EmailConfirmed (and other properties) on identity user from same on User object (but IUserManager.AddUser method does) [BUG] IUserManager.UpdateUser method does not set Email & EmailConfirmed on identity user from same on User object (but IUserManager.AddUser method does) May 11, 2024
@lanthonyneville lanthonyneville changed the title [BUG] IUserManager.UpdateUser method does not set Email & EmailConfirmed on identity user from same on User object (but IUserManager.AddUser method does) [BUG] IUserManager.UpdateUser method does not set EmailConfirmed on identity user from same on User object (but IUserManager.AddUser method does) May 11, 2024
@lanthonyneville lanthonyneville changed the title [BUG] IUserManager.UpdateUser method does not set EmailConfirmed on identity user from same on User object (but IUserManager.AddUser method does) [ENH] Allow IUserManager.UpdateUser method to set EmailConfirmed on identity user from same on User object (as IUserManager.AddUser method does) May 11, 2024
sbwalker added a commit that referenced this issue May 20, 2024
fix #4249 - allow EmailConfirmed property to be updated
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

No branches or pull requests

1 participant