Changeset f767654 in github


Ignore:
Timestamp:
Jun 20, 2010 5:27:32 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
8dfe51e
Parents:
d7a5dfa2
Message:
  • Add %dc variable support in base_dn/bind_dn config (#1486779)
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r16e8314 rf767654  
    22=========================== 
    33 
     4- Add %dc variable support in base_dn/bind_dn config (#1486779) 
    45- Add button to hide/unhide the preview pane (#1484215) 
    56- Fix no-cache headers on https to prevent content caching by proxies (#1486798) 
  • config/main.inc.php.dist

    r5852c14d rf767654  
    410410  // %u  - The username prior to the '@'. 
    411411  // %d  - The domain name after the '@'. 
     412  // %dc - The domain name hierarchal string e.g. "dc=test,dc=domain,dc=com" 
    412413  'base_dn'       => '', 
    413414  'bind_dn'       => '', 
  • program/include/rcube_ldap.php

    rbb8721aa rf767654  
    133133        $fu = $RCMAIL->user->get_username(); 
    134134        list($u, $d) = explode('@', $fu); 
    135          
     135        $dc = 'dc='.strtr($d, array('.' => ',dc=')); // hierarchal domain string 
     136 
    136137        // Replace the bind_dn and base_dn variables. 
    137         $replaces = array('%fu' => $fu, '%u' => $u, '%d' => $d); 
     138        $replaces = array('%dc' => $dc, '%d' => $d, '%fu' => $fu, '%u' => $u); 
    138139        $this->prop['bind_dn'] = strtr($this->prop['bind_dn'], $replaces); 
    139140        $this->prop['base_dn'] = strtr($this->prop['base_dn'], $replaces); 
    140141      } 
    141        
     142 
    142143      if (!empty($this->prop['bind_dn']) && !empty($this->prop['bind_pass'])) 
    143144        $this->ready = $this->bind($this->prop['bind_dn'], $this->prop['bind_pass']); 
Note: See TracChangeset for help on using the changeset viewer.