Hi,
i wonder, can i get username from the hooks … i want apply a hook for any user except administrator
Thanks
Hi,
i wonder, can i get username from the hooks … i want apply a hook for any user except administrator
Thanks
Add a condition in your method!
Share what have you done so far.
sure here :
def check():
exp_date = frappe.db.get_value(“Global Defaults”,None,“license”)
if exp_date and exp_date!=“”:
expire = datetime.datetime.strptime(exp_date, “%Y-%m-%d”)
if expire <= datetime.datetime.today():
frappe.throw(“License Expire , cant login to your account.”)
but i want to made exception for administrator