Browse Source

[fix] disable twofactor

version-14
Rushabh Mehta 8 years ago
parent
commit
92403aabba
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      frappe/twofactor.py

+ 1
- 1
frappe/twofactor.py View File

@@ -24,7 +24,7 @@ def toggle_two_factor_auth(state, roles=[]):

def two_factor_is_enabled(user=None):
'''Returns True if 2FA is enabled.'''
enabled = frappe.db.get_value('System Settings', None, 'enable_two_factor_auth')
enabled = int(frappe.db.get_value('System Settings', None, 'enable_two_factor_auth') or 0)
if not user or not enabled:
return enabled
return two_factor_is_enabled_for_(user)


Loading…
Cancel
Save