Changeset 697 for trunk/jabberit_messenger/inc/class.ldap_im.inc.php
- Timestamp:
- 03/12/09 11:32:55 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jabberit_messenger/inc/class.ldap_im.inc.php
r563 r697 35 35 $this->jid = $_SESSION['phpgw_info']['jabberit_messenger']['user']; 36 36 $this->max_result = 50; 37 38 // Ou User39 $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=")));42 37 } 43 38 … … 85 80 86 81 @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; 87 100 } 88 101 … … 156 169 } 157 170 158 public final function list_users_ldap( $search, $uidnumber, $groupsDeny)171 public final function list_users_ldap( $search, $uidnumber, $ous = false ) 159 172 { 160 173 $this->_connect_ldap(); … … 166 179 // SERPRO 167 180 //$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); 170 184 else 171 185 $search = ldap_search($this->ldap,$this->ldap_context,$filter,$justthese, 0, $this->max_result + 1); 186 172 187 $entry1 = ldap_get_entries($this->ldap,$search); 173 $entry = ldap_first_entry( $this->ldap, $search);188 $entry = ldap_first_entry($this->ldap,$search); 174 189 } 175 190 … … 297 312 return $result_groups; 298 313 } 299 300 314 } 301 315
Note: See TracChangeset
for help on using the changeset viewer.