Changeset 1900 for trunk/jabberit_messenger/inc/webservice.php
- Timestamp:
- 12/28/09 15:59:20 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jabberit_messenger/inc/webservice.php
r1885 r1900 13 13 class webService 14 14 { 15 private $attribute; 15 16 private $conn; 16 17 private $contextLdap; … … 23 24 private $fileLdapInternal = false; 24 25 private $fileLdapExternal = false; 26 private $version3; 25 27 26 28 function __construct() … … 42 44 $this->fileLdapInternal = true; 43 45 } 46 47 $this->attribute = "uid"; 48 49 if ( file_exists('attributeLdap.php') ) 50 { 51 require_once('attributeLdap.php'); 52 $this->attribute = trim($attributeTypeName); 53 } 44 54 } 45 55 … … 54 64 if( $this->version3 ) 55 65 if( !ldap_set_option($this->conn,LDAP_OPT_PROTOCOL_VERSION,3) ) 56 $this->version = false;66 $this->version3 = false; 57 67 58 68 ldap_set_option($this->conn, LDAP_OPT_REFERRALS, $this->refer); … … 179 189 if( $this->conn ) 180 190 { 181 $filter = "(&(phpgwaccounttype=u)( uid=".$uid.")(!(phpgwaccountvisible=-1)))";182 $justthese = array( "uid","cn","dn");191 $filter = "(&(phpgwaccounttype=u)(".$this->attribute."=".$uid.")(!(phpgwaccountvisible=-1)))"; 192 $justthese = array($this->attribute,"cn","dn"); 183 193 $search = ldap_search( $this->conn, $this->contextLdap, $filter,$justthese); 184 194 $get_entries = ldap_get_entries( $this->conn, $search); … … 204 214 if( $this->conn ) 205 215 { 206 $filter = "(&(phpgwaccounttype=u)( uid=".$uid.")(!(phpgwaccountvisible=-1)))";207 $justthese = array( "uid","cn","dn");216 $filter = "(&(phpgwaccounttype=u)(".$this->attribute."=".$uid.")(!(phpgwaccountvisible=-1)))"; 217 $justthese = array($this->attribute,"cn","dn"); 208 218 $search = ldap_search( $this->conn, $this->contextLdap, $filter, $justthese); 209 219 $get_entries = ldap_get_entries( $this->conn, $search); … … 245 255 if( $this->conn ) 246 256 { 247 $filter = "(&(phpgwaccounttype=u)( uid=".$uid.")(!(phpgwaccountvisible=-1)))";248 $justthese = array( "uid","jpegPhoto");257 $filter = "(&(phpgwaccounttype=u)(".$this->attribute."=".$uid.")(!(phpgwaccountvisible=-1)))"; 258 $justthese = array($this->attribute,"jpegPhoto"); 249 259 $search = ldap_search($this->conn,$this->contextLdap,$filter,$justthese); 250 260 $get_entries = ldap_get_entries($this->conn,$search); … … 277 287 if( $this->conn ) 278 288 { 279 $filter = "(&(phpgwaccounttype=u)( uid=".$uid.")(!(phpgwaccountvisible=-1)))";280 $justthese = array( "uid","jpegPhoto");289 $filter = "(&(phpgwaccounttype=u)(".$this->attribute."=".$uid.")(!(phpgwaccountvisible=-1)))"; 290 $justthese = array($this->attribute,"jpegPhoto"); 281 291 $search = ldap_search($this->conn,$this->contextLdap,$filter,$justthese); 282 292 $get_entries = ldap_get_entries($this->conn,$search);
Note: See TracChangeset
for help on using the changeset viewer.