do not allow verification of deregistered accounts

This commit is contained in:
rgarcia
2016-12-12 17:11:39 +01:00
parent d7e73b8abb
commit 6b0f8eb62b
2 changed files with 21 additions and 1 deletions

View File

@@ -40,7 +40,7 @@ class Verification::Residence
end
def document_number_uniqueness
errors.add(:document_number, I18n.t('errors.messages.taken')) if User.active.where(document_number: document_number).any?
errors.add(:document_number, I18n.t('errors.messages.taken')) if User.where(document_number: document_number).any?
end
def store_failed_attempt