fix: created get_user_info api

This commit is contained in:
Shariq Ansari 2023-07-20 21:02:07 +05:30
parent a4ee48733f
commit f80dbafd1a

7
crm/api/session.py Normal file
View File

@ -0,0 +1,7 @@
import frappe
@frappe.whitelist()
def get_user_info():
user = frappe.db.get_value("User", frappe.session.user, ["name", "full_name", "first_name", "last_name", "user_image", ], as_dict=1)
return user