In auth_user, I created additional field called 'office' by following
code

 ## additonal fields
auth.settings.extra_fields['auth_user']= [
  Field('office')]

Now, I want to map the field value from AD. The field name is
"initials".
(I know it's strange but other fields was taken for other purposes)
Does anybody know how to do it ?


In ldap_auth.py,
-----------------------------
if ldap_mode == 'ad':
                # Microsoft Active Directory
...
...

result = con.search_ext_s(
                    ldap_basedn, ldap.SCOPE_SUBTREE,
                    "(&(sAMAccountName=%s)(%s))" % (username_bare,
filterstr), ["sAMAccountName"])[0][1]
-----------------------------

I can see it's mapping "sAMAccountNAme" field in AD. I want to do the
same for office = initials...

Reply via email to