[ZendTo] authLDAPOrganization1

Jules Jules at Zend.To
Tue Sep 12 11:37:36 BST 2017


That would involve a tweak to /opt/zendto/lib/NSSADAuthenticator.php.

However, it's a remarkably simple one. Look in that file for the 
string"organization". There are 2 places it appears.
In *both* places, if you replace that line with something like

if (array_key_exists('company', $response) && $response['company'] !== '') {
     $response['organization'] = $response['company'];
} else {
     $response['organization'] = $this->_ldapOrg;
}

then it will use the "company" attribute if it's set for that user, and 
the "authLDAPOrganization1" value if it is not set for that user.

Does that do what you want?

Cheers,
Jules.


On 25/08/2017 17:27, Windows Angra wrote:
> Hello guys!
>
> I just downloaded and installed ZendTo 4.28 on CentOS 6.9 and set up 
> authentication via Active Directory. The system is working properly.
>
> My question is this: I currently insert the "company name" into the 
> variable "authLDAPOrganization1" in the preferences.php file. However, 
> I would like ZendTo to get this value from the Active Directory 
> "company" attribute, just as it gets the "displayname" and "mail" 
> attributes.
>
>
> Any idea how to get this value?
>
>
>
> _______________________________________________
> ZendTo mailing list
> ZendTo at zend.to
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/zendto

Jules

-- 
Julian Field MEng CEng CITP MBCS MIEEE MACM

'When I read Shakespeare I am struck with wonder
  That such trivial people should muse and thunder
  In such lovely language.' - D.H. Lawrence

www.Zend.To
Twitter: @JulesFM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/zendto/attachments/20170912/39d724c6/attachment.html 


More information about the ZendTo mailing list