Ignore:
Timestamp:
05/25/07 17:50:27 (17 years ago)
Author:
niltonneto
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.ldap_functions.inc.php

    r21 r27  
    323323                } 
    324324        } 
     325 
     326        function getUserByEmail($params){        
     327                // Follow the referral 
     328                $email = $params['email']; 
     329                $this->ldapConnect(true); 
     330                if ($this->ds) 
     331                { 
     332                        $filter="(&(phpgwAccountType=u)(mail=$email))";          
     333                        $justthese = array("cn","telephoneNumber","jpegPhoto"); 
     334                        $sr=ldap_search($this->ds, $this->ldap_context, $filter, $justthese); 
     335                        $entry = ldap_first_entry($this->ds, $sr);                       
     336                        if($entry) {                                             
     337                                $obj =  array("cn" => @ldap_get_values($this->ds, $entry, "cn"), 
     338                                                  "email" => $email, 
     339                                                  "type" => "global", 
     340                                                  "telefone" =>  @ldap_get_values($this->ds, $entry, "telephonenumber")); 
     341 
     342                                $_SESSION['phpgw_info']['expressomail']['contact_photo'] = @ldap_get_values_len($this->ds, $entry, "jpegphoto"); 
     343                                ldap_close($this->ds);                           
     344                                return $obj; 
     345                        }                
     346                } 
     347                return null; 
     348        } 
    325349} 
    326350?> 
Note: See TracChangeset for help on using the changeset viewer.