fix: dont respond to login api call if email login is disabled (#20311)
This commit is contained in:
parent
97ca92e3d1
commit
90be13e7ee
1 changed files with 3 additions and 0 deletions
|
|
@ -121,6 +121,9 @@ def login_via_token(login_token: str):
|
|||
@rate_limit(limit=5, seconds=60 * 60)
|
||||
def send_login_link(email: str):
|
||||
|
||||
if not frappe.get_system_settings("login_with_email_link"):
|
||||
return
|
||||
|
||||
expiry = frappe.get_system_settings("login_with_email_link_expiry") or 10
|
||||
link = _generate_temporary_login_link(email, expiry)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue