public function LdapServer::deriveEmailFromEntry in Lightweight Directory Access Protocol (LDAP) 7
1 call to LdapServer::deriveEmailFromEntry()
- LdapServer::user_lookup in ldap_servers/
LdapServer.class.php - Queries LDAP server for the user.
File
- ldap_servers/
LdapServer.class.php, line 836 - Defines server classes and related functions.
Class
- LdapServer
- LDAP Server Class
Code
public function deriveEmailFromEntry($ldap_entry) {
if ($this->mail_attr) {
// not using template
return @$ldap_entry[ldap_server_massage_text($this->mail_attr, 'attr_name', LDAP_SERVER_MASSAGE_QUERY_ARRAY)][0];
}
elseif ($this->mail_template) {
// template is of form [cn]@illinois.edu
ldap_server_module_load_include('inc', 'ldap_servers', 'ldap_servers.functions');
return ldap_server_token_replace($ldap_entry, $this->mail_template);
}
else {
return FALSE;
}
}