wpdirauth_ldapreturnkeys
Description
Fires before making an ldap_search. Allows you to add extra ldap attributes to be returned in a successful search.
Parameters
$aryKeys
(array) List of requested ldap attributes in addition to the defaults of [‘sn’, ‘givenname’, ‘mail’].
Default: array()
Returns
Your callback function should return an array of ldap attributes.
Example
[php]
/**
* Add department and telephone number attribute to ldap_search return
*/
add_filter(‘wpdirauth_ldapreturnkeys’,function($aryKeys){
$myKeys = array(‘department’,’telephoneNumber’);
return array_merge($aryKeys,$myKeys);
},10,1);
[/php]