diff --git a/internal/api/ui/login/password_reset_handler.go b/internal/api/ui/login/password_reset_handler.go index 90da71d263..c85ca97b74 100644 --- a/internal/api/ui/login/password_reset_handler.go +++ b/internal/api/ui/login/password_reset_handler.go @@ -25,6 +25,9 @@ func (l *Login) handlePasswordReset(w http.ResponseWriter, r *http.Request) { } user, err := l.query.GetUser(setContext(r.Context(), authReq.UserOrgID), true, false, loginName) if err != nil { + if authReq.LoginPolicy.IgnoreUnknownUsernames && errors.IsNotFound(err) { + err = nil + } l.renderPasswordResetDone(w, r, authReq, err) return }