mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 07:32:50 +00:00
logout a disabled user
This commit is contained in:
@@ -82,6 +82,10 @@ def update_security(args=''):
|
||||
webnotes.conn.set_value('Profile', args['user'], 'login_before', args.get('login_before') or None)
|
||||
webnotes.conn.set_value('Profile', args['user'], 'enabled', int(args.get('enabled',0)) or 0)
|
||||
|
||||
# logout a disabled user
|
||||
if not int(args.get('enabled',0) or 0):
|
||||
webnotes.login_manager.logout(user=args['user'])
|
||||
|
||||
if args.get('new_password') and args.get('sys_admin_pwd'):
|
||||
from webnotes.utils import cint
|
||||
webnotes.conn.sql("update tabProfile set password=password(%s) where name=%s",
|
||||
|
||||
Reference in New Issue
Block a user