diff --git a/src/Controllers/HomeController.cs b/src/Controllers/HomeController.cs index 50d2f3e..88106b0 100644 --- a/src/Controllers/HomeController.cs +++ b/src/Controllers/HomeController.cs @@ -77,7 +77,7 @@ public class HomeController : Controller [HttpGet("Users")] public async Task UsersAsync() { - IEnumerable users = await _ldap.ListUsersAsync(); + IEnumerable users = await _ldap.ListUsersAsync([.. _ldap.UsersAttributes.Where(attr => attr != "jpegPhoto" && attr != "userPassword")]); List UserTableViewModels = []; foreach (UserModel user in users) { diff --git a/src/Services/LdapService.cs b/src/Services/LdapService.cs index 6c5e160..1f58ce7 100644 --- a/src/Services/LdapService.cs +++ b/src/Services/LdapService.cs @@ -77,10 +77,7 @@ public partial class LdapService : IDisposable public async Task> ListUsersAsync() { - IEnumerable> users = await ListObjectBy(UsersBaseDn, "", UsersAttributes); - List models = []; - users.ToList().ForEach(x => models.Add(new UserModel(x) {Uid = x["uid"]})); - return models; + return await ListUsersAsync(UsersAttributes); } public async Task GetMigrationVersionAsync()