diff --git a/pkg/user/user_password_reset.go b/pkg/user/user_password_reset.go index 431c1fe47..204cef3c4 100644 --- a/pkg/user/user_password_reset.go +++ b/pkg/user/user_password_reset.go @@ -116,6 +116,10 @@ func RequestUserPasswordResetTokenByEmail(s *xorm.Session, tr *PasswordTokenRequ return } + if user.Status == StatusDisabled { + return &ErrAccountDisabled{UserID: user.ID} + } + return RequestUserPasswordResetToken(s, user) }