Retrieve pass hash from db

This commit is contained in:
2024-11-06 21:52:46 +01:00
parent 48f75b3839
commit 1a14c06be2
2 changed files with 4 additions and 8 deletions

View File

@@ -93,10 +93,6 @@ func (h *Handler) UpdateProfile() http.HandlerFunc {
return
}
user.PasswordHash = string(hashedPassword)
} else if req.CurrentPassword != "" {
// If current password is provided but no new password, that's an error
http.Error(w, "New password is required when current password is provided", http.StatusBadRequest)
return
}
// Handle email update if requested