mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2026-03-13 07:49:55 +08:00
Users now become unverified when email is changed (#783)
* Users now become unverified when email is changed Occurs when updating user.email to a new value * changed wording
This commit is contained in:
@@ -545,6 +545,7 @@ class BaseUserManager(Generic[models.UC, models.UD]):
|
||||
raise UserAlreadyExists()
|
||||
except UserNotExists:
|
||||
user.email = value
|
||||
user.is_verified = False
|
||||
elif field == "password":
|
||||
await self.validate_password(value, user)
|
||||
hashed_password = get_password_hash(value)
|
||||
|
||||
Reference in New Issue
Block a user