BinaryStudio.TaskManager.Web.Controllers.ReminderController.GetUsers C# (CSharp) Method

GetUsers() private method

private GetUsers ( string name, string applicationKey ) : System.Web.Mvc.JsonResult
name string
applicationKey string
return System.Web.Mvc.JsonResult
        public JsonResult GetUsers (string name, string applicationKey)
        {
            Configuration myWebConfig = WebConfigurationManager.OpenWebConfiguration(null);
            KeyValueConfigurationElement customSetting = myWebConfig.AppSettings.Settings["IntegrationKey"];
            if(customSetting!=null)
            {
                if(customSetting.Value==applicationKey)
                {
                    var user = userRepository.GetByName(name);
                    string userName = user != null ? user.UserName :  "";
                    int userId = user != null ? user.Id : -1;
                    return Json(new object[] {userName,userId});
                }
            }
            return Json(false);
        }