1
0
Fork 0

Revert "Allow unconfirmed access for 3 days when OmniAuth sign up"

This reverts commit 1eac19662f.
This commit is contained in:
Alex Kotov 2018-12-04 09:15:44 +05:00
parent 1eac19662f
commit 623aff5f94
No known key found for this signature in database
GPG Key ID: 4E831250F47DE154
1 changed files with 0 additions and 11 deletions

View File

@ -1,8 +1,6 @@
# frozen_string_literal: true
class User < ApplicationRecord
ALLOW_UNCONFIRMED_OMNIAUTH_ACCESS_FOR = 3.days
devise(
:confirmable,
:database_authenticatable,
@ -26,13 +24,4 @@ class User < ApplicationRecord
before_validation do
self.account ||= Account.new
end
def confirmation_period_valid?
return if user_omniauths.where(email: email).exists? &&
confirmation_sent_at &&
confirmation_sent_at.utc >=
ALLOW_UNCONFIRMED_OMNIAUTH_ACCESS_FOR.ago
super
end
end