about summary refs log tree commit diff
path: root/app/models/user.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 8840de82d..c0600fe75 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -58,6 +58,11 @@ class User < ApplicationRecord
 
   before_validation :sanitize_languages
 
+  # This avoids a deprecation warning from Rails 5.1
+  # It seems possible that a future release of devise-two-factor will
+  # handle this itself, and this can be removed from our User class.
+  attribute :otp_secret
+
   def confirmed?
     confirmed_at.present?
   end