[ZendTo] Fill in organization from AD attribute

Jules Jules at Zend.To
Fri Feb 21 09:27:24 GMT 2020


Ionescu,

If you are using AD, you should be using the AD authenticator and not 
the LDAP authenticator. They are not quite the same thing.

As for the "organization" versus "company" attributes, if the 
organization attribute is empty, the company attribute is copied into 
it. That means the rest of ZendTo can continue to call it 'organization' 
without worrying about Microsoft's naming conventions.

If the LDAP attributes for a user include the "company" attribute, that 
will be used as the "organization" in ZendTo. If there is no "company" 
attribute, then the preferences.php setting "authLDAPOrganization1" (for 
the first forest searched) is used instead.

Hopefully that explains things a bit better.

Cheers,
Jules.


On 11/02/2020 3:41 pm, Ionescu Gigel via ZendTo wrote:
> Hello,
> I want to fill in the organization field automatically from AD.
> I would like to know how the authLDAPOrganization option really works 
> and if my understanding is right.
> I read some old posts from the time this option was introduced, but I 
> still don't get it. As far as I see what I put in that option that 
> will be the default text for internal authenticated users.
>
> From the lib/NSSLDAPAuthenticator.php code in $attributeNames array I 
> see you are trying to get some "organization" attribute. Actually, 
> this will be always empty as AD stores the name of the company in 
> "company" attribute, so few lines down if 
> (!@$response['organization']) does not make any sense.
>
> Can someone enlight me, please?
> As I said, my goal would be to have the organization from AD if 
> authLDAPOrganization is empty or if I set the AD attribute where I 
> store the name of the organization.
>
> Regards,
>
>
> _______________________________________________
> ZendTo mailing list
> ZendTo at zend.to
> http://jul.es/mailman/listinfo/zendto

Jules

-- 
Julian Field MEng CEng CITP MBCS MIEEE MACM


www.Zend.To
Twitter: @JulesFM

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jul.es/pipermail/zendto/attachments/20200221/1bc05bce/attachment.html>


More information about the ZendTo mailing list