예제 #1
0
 public function deriveEmailFromEntry($ldap_entry)
 {
     if ($this->mail_attr) {
         // not using template
         return @$ldap_entry[$this->mail_attr][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;
     }
 }
예제 #2
0
 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;
     }
 }