mirror of
https://github.com/discourse/discourse.git
synced 2025-03-03 17:59:20 +00:00
Fix the build.
This commit is contained in:
parent
0ed2834c2d
commit
50e59fb9bd
@ -1,10 +1,6 @@
|
||||
class UserSecondFactor < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
|
||||
scope :totp, -> do
|
||||
where(method: UserSecondFactor.methods[:totp])
|
||||
end
|
||||
|
||||
scope :backup_codes, -> do
|
||||
where(method: UserSecondFactor.methods[:backup_codes], enabled: true)
|
||||
end
|
||||
@ -16,6 +12,10 @@ class UserSecondFactor < ActiveRecord::Base
|
||||
)
|
||||
end
|
||||
|
||||
def self.totp
|
||||
where(method: self.methods[:totp]).first
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# == Schema Information
|
||||
|
Loading…
x
Reference in New Issue
Block a user