Example #1
0
        public ActionResult Index()
        {
            var loginId = User.Identity.Name;
            //If user Id has main name prefix
            var domainIdx = loginId.IndexOf("\\") + 1;

            if (domainIdx != -1)
            {
                loginId = loginId.Substring(domainIdx);
            }
            AdUserModel userDetails = ActiveDirectoryHelper.GetUserDetailsFromLoginId(loginId);

            return(View(userDetails));
        }
Example #2
0
        public JsonResult GetUserByUserId(string loginId)
        {
            AdUserModel userDetails = ActiveDirectoryHelper.GetUserDetailsFromLoginId(loginId);

            return(Json(userDetails, JsonRequestBehavior.AllowGet));
        }