Try ERPNext Buy Support Partners Foundation

Get Currently logged in userdetails in javascript

Dear,

I need logged in user details to restrict some functionalities other than accessing doctypes.

Its working fine on browser.

but i’m able to get uesr id in erpnext mobile app

i have tried like
frappe.get_cookie(‘user_id’)
frappe.getCookie(‘user_id’)
frappe.session.user
frappe.user.name
user

i’m appending the code in frappe/js/misc/common.js.
Because i need to do the mentioned restriction in all pages

Please help me ASAP.