diff --git a/lib/ldap/group.rb b/lib/ldap/group.rb index e92aa58ad..545ac9d29 100644 --- a/lib/ldap/group.rb +++ b/lib/ldap/group.rb @@ -136,8 +136,11 @@ class Ldap def group_user_dns(entry) return entry[:member] if entry[:member].present? - return if entry[:memberuid].blank? + return group_user_dns_memberuid(entry) if entry[:memberuid].present? + return entry[:uniquemember] if entry[:uniquemember].present? + end + def group_user_dns_memberuid(entry) entry[:memberuid].collect do |uid| dn = nil @ldap.search("(uid=#{uid})", attributes: %w[dn]) do |user|