Ignore:
Timestamp:
03/12/09 11:32:55 (15 years ago)
Author:
niltonneto
Message:

Fechamento das ocorrências referentes à versão 0.7.11

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/jabberit_messenger/inc/class.ldap_im.inc.php

    r563 r697  
    3535                $this->jid                      = $_SESSION['phpgw_info']['jabberit_messenger']['user']; 
    3636                $this->max_result       = 50; 
    37                  
    38                 // Ou User 
    39                 $this->ou_User = $_SESSION['phpgw_info']['jabberit_messenger']['account_dn']; 
    40                 $this->ou_User = substr($this->ou_User,strpos($this->ou_User, "ou=")); 
    41                 $this->ou_User = strtoupper(substr($this->ou_User, 0, strpos($this->ou_User, ",dc="))); 
    4237        } 
    4338 
     
    8580                 
    8681                @ldap_bind($this->ldap,$this->ldap_dn,$this->ldap_pass); 
     82        } 
     83 
     84        public final function list_groups_memberUid($pGroup) 
     85        { 
     86                $this->_ldapConnect(); 
     87                 
     88                if( $this->ldap ) 
     89                { 
     90                        $filter = "(&(objectclass=posixgroup)(|".$pGroup."))"; 
     91                        $justthese = array("dn","memberuid","gidnumber"); 
     92                        $search = ldap_search($this->ldap,$this->ldap_context,$filter, $justthese); 
     93                        $result = ldap_get_entries($this->ldap,$search); 
     94                         
     95                        if( $result['count'] > 0 ) 
     96                                return $result; 
     97                }                
     98                 
     99                return false; 
    87100        } 
    88101 
     
    156169        } 
    157170 
    158         public final function list_users_ldap($search, $uidnumber, $groupsDeny) 
     171        public final function list_users_ldap( $search, $uidnumber, $ous = false ) 
    159172        { 
    160173                $this->_connect_ldap(); 
     
    166179                        // SERPRO 
    167180                        //$justthese = array("uid","uidNumber","cn","mail","description","phpgwAccountVisible","dn","jpegPhoto"); 
    168                         if( $groupsDeny )                        
    169                                 $search = ldap_search($this->ldap,$this->ou_User.",".$this->ldap_context,$filter,$justthese, 0, $this->max_result + 1); 
     181         
     182                        if( $ous != false ) 
     183                                $search = ldap_search($this->ldap,$ous.",".$this->ldap_context,$filter,$justthese, 0, $this->max_result + 1); 
    170184                        else 
    171185                                $search = ldap_search($this->ldap,$this->ldap_context,$filter,$justthese, 0, $this->max_result + 1); 
     186 
    172187                        $entry1 = ldap_get_entries($this->ldap,$search); 
    173                         $entry = ldap_first_entry( $this->ldap, $search ); 
     188                        $entry  = ldap_first_entry($this->ldap,$search); 
    174189                } 
    175190 
     
    297312                return $result_groups; 
    298313        } 
    299  
    300314} 
    301315 
Note: See TracChangeset for help on using the changeset viewer.