Changeset 169


Ignore:
Timestamp:
02/26/08 17:01:30 (16 years ago)
Author:
niltonneto
Message:

Ticket 145

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/inc/class.common.inc.php

    r63 r169  
    2626  \**************************************************************************/ 
    2727 
    28  
     28        function ldap_rebind($ldap_connection, $ldap_url) 
     29        { 
     30                @ldap_bind($ldap_connection, $GLOBALS['phpgw_info']['server']['user_ldap_referral'], $GLOBALS['phpgw_info']['server']['password_ldap_referral']); 
     31        } 
    2932        $d1 = strtolower(@substr(PHPGW_API_INC,0,3)); 
    3033        $d2 = strtolower(@substr(PHPGW_SERVER_ROOT,0,3)); 
     
    255258                        } 
    256259 
    257                         else if(strstr($host, "ldap://")){ 
     260                        /*else if(strstr($host, "ldap://")){ 
    258261                                $dn = ''; 
    259262                                $passwd = ''; 
    260                         } 
     263                        }*/ 
    261264 
    262265                        if(!function_exists('ldap_connect')) 
     
    296299                         
    297300                        ldap_set_option($ds, LDAP_OPT_REFERRALS, $ldapreferral); 
    298                          
     301                        if($ldapreferral){ 
     302                                $GLOBALS['phpgw_info']['server']['user_ldap_referral'] = $dn; 
     303                                $GLOBALS['phpgw_info']['server']['password_ldap_referral'] = $passwd; 
     304                                ldap_set_rebind_proc($ds, ldap_rebind); 
     305                        } 
    299306                        // bind as admin 
    300307                        if($dn && $passwd && ! ldap_bind($ds,$dn,$passwd)) 
Note: See TracChangeset for help on using the changeset viewer.