Get logged in user using ECMA Script
function getWebUserData() { $.blockUI(); // debugger; web = context.get_web(); currentUser = web.get_currentUser(); currentUser.retrieve(); context.load(web); context.executeQueryAsync(Function.createDelegate(this, this.onSuccessMethod), Function.createDelegate(this, this.onFailureMethod)); } function onSuccessMethod(sender, args) { userObject = web.get_currentUser(); loggginname = userObject.get_loginName(); loggginname = loggginname.split("\\")[1]; currentUrl = window.location.origin; currentUrl = currentUrl + "/"; var clientContext = new SP.ClientContext(currentUrl); empBasicInfoLst = clientContext.get_web().get_lists().getByTitle("EmpBasicInfo"); spCamlQueryObj = new SP.CamlQuery(); spQueryGetUserInfo = "<View><Query><Wher...