public async Task <ActionResult> UsersDisplay(string userName) { using (UserDefinitionDataProvider dataProvider = new UserDefinitionDataProvider()) { UserDefinition user = await dataProvider.GetItemAsync(userName); if (user == null) { throw new Error(this.__ResStr("notFound", "User \"{0}\" not found."), userName); } DisplayModel model = new DisplayModel(); model.SetData(user); using (UserLoginInfoDataProvider userLogInfoDP = new UserLoginInfoDataProvider()) { List <DataProviderFilterInfo> filters = null; filters = DataProviderFilterInfo.Join(filters, new DataProviderFilterInfo { Field = nameof(UserDefinition.UserId), Operator = "==", Value = user.UserId }); DataProviderGetRecords <LoginInfo> list = await userLogInfoDP.GetItemsAsync(0, 0, null, filters); model.LoginProviders = (from LoginInfo l in list.Data select l.LoginProvider).ToList(); } Module.Title = this.__ResStr("modDisplayTitle", "User {0}", userName); return(View(model)); } }