fix: always update password on re-registration in /user/create
When Evotor sends a new /user/create for an existing userId, the new password should replace the old one so /user/verify stays in sync. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -141,7 +141,7 @@ async def user_create(request: Request, db: Session = Depends(get_db)):
|
||||
user.last_name = last_name
|
||||
if middle_name:
|
||||
user.middle_name = middle_name
|
||||
if password and not user.password_hash:
|
||||
if password:
|
||||
user.password_hash = hash_password(password)
|
||||
if user.status == UserStatusEnum.pending:
|
||||
user.status = UserStatusEnum.active
|
||||
|
||||
Reference in New Issue
Block a user