Changeset 344


Ignore:
Timestamp:
07/04/08 16:59:17 (16 years ago)
Author:
niltonneto
Message:

Alteração no código para não gerar erro no log, quando não encontra
nenhum resultado ou há problema momentâneo de conexão.

File:
1 edited

Legend:

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

    r342 r344  
    587587                        $filter="(&(phpgwAccountType=u)(uid=$uid))";             
    588588                        $justthese = array("cn"); 
    589                         $sr=ldap_search($this->ds, $this->ldap_context, $filter, $justthese); 
    590                          
     589                        $sr=@ldap_search($this->ds, $this->ldap_context, $filter, $justthese); 
     590                        if(!$sr) 
     591                                return false; 
    591592                        $info = ldap_get_entries($this->ds, $sr); 
    592593                        return utf8_decode($info[0]["cn"][0]); 
Note: See TracChangeset for help on using the changeset viewer.