fix: username required
as part of the search the login/user name is required to find the user issue #13738
This commit is contained in:
parent
622800453a
commit
68a5ac2b34
1 changed files with 1 additions and 3 deletions
|
|
@ -177,14 +177,12 @@ class LDAPSettings(Document):
|
|||
|
||||
fetch_ldap_groups = getattr(user, self.ldap_group_field).values
|
||||
|
||||
|
||||
if ldap_object_class is not None:
|
||||
conn.search(
|
||||
search_base=self.organizational_unit_for_groups,
|
||||
search_filter="(&(objectClass={0})({1}={2}))".format(ldap_object_class,ldap_group_members_attribute, user),
|
||||
search_filter="(&(objectClass={0})({1}={2}))".format(ldap_object_class,ldap_group_members_attribute, frappe.as_unicode(frappe.form_dict.usr)),
|
||||
attributes=ldap_attributes) # Build search query
|
||||
|
||||
|
||||
if len(conn.entries) >= 1:
|
||||
|
||||
fetch_ldap_groups = []
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue