feat: pre-login hook (#26394)
This commit is contained in:
parent
49fb60a0dd
commit
c19e6a8732
1 changed files with 2 additions and 0 deletions
|
|
@ -125,6 +125,8 @@ class LoginManager:
|
|||
self.set_user_info()
|
||||
|
||||
def login(self):
|
||||
self.run_trigger("before_login")
|
||||
|
||||
if frappe.get_system_settings("disable_user_pass_login"):
|
||||
frappe.throw(_("Login with username and password is not allowed."), frappe.AuthenticationError)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue