summaryrefslogtreecommitdiffstats
path: root/lib/redmine/twofa.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/redmine/twofa.rb')
-rw-r--r--lib/redmine/twofa.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/redmine/twofa.rb b/lib/redmine/twofa.rb
index 44f1b7ac6..0096f3951 100644
--- a/lib/redmine/twofa.rb
+++ b/lib/redmine/twofa.rb
@@ -36,6 +36,11 @@ module Redmine
for_twofa_scheme(user.twofa_scheme).try(:new, user)
end
+ def self.unpair_all!
+ users = User.where.not(twofa_scheme: nil)
+ users.each { |u| self.for_user(u).destroy_pairing_without_verify! }
+ end
+
def self.schemes
initialize_schemes
@@schemes