Allow setting imap configuration for Horde framework libs
This commit is contained in:
parent
bfac75d8fe
commit
722a400e01
1 changed files with 7 additions and 4 deletions
|
@ -33,15 +33,18 @@ class rcube_kolab
|
||||||
|
|
||||||
$rcmail = rcmail::get_instance();
|
$rcmail = rcmail::get_instance();
|
||||||
|
|
||||||
|
// get password of logged user
|
||||||
|
$pwd = $rcmail->decrypt($_SESSION['password']);
|
||||||
|
|
||||||
// load ldap credentials from local config
|
// load ldap credentials from local config
|
||||||
$conf['kolab'] = $rcmail->config->get('kolab');
|
$conf['kolab'] = $rcmail->config->get('kolab');
|
||||||
|
|
||||||
$conf['kolab']['ldap'] += array('server' => 'ldap://' . $_SESSION['imap_host'] . ':389');
|
$conf['kolab']['ldap'] += array('server' => 'ldap://' . $_SESSION['imap_host'] . ':389');
|
||||||
$conf['kolab']['imap'] = array('server' => $_SESSION['imap_host'], 'port' => $_SESSION['imap_port']);
|
$conf['kolab']['imap'] += array('server' => $_SESSION['imap_host'], 'port' => $_SESSION['imap_port']);
|
||||||
|
|
||||||
// pass the current IMAP authentication credentials to the Horde auth system
|
// pass the current IMAP authentication credentials to the Horde auth system
|
||||||
self::$horde_auth = Auth::singleton('kolab');
|
self::$horde_auth = Auth::singleton('kolab');
|
||||||
if (self::$horde_auth->authenticate($_SESSION['username'], array('password' => ($pwd = $rcmail->decrypt($_SESSION['password']))), false)) {
|
if (self::$horde_auth->authenticate($_SESSION['username'], array('password' => $pwd), false)) {
|
||||||
$_SESSION['__auth'] = array(
|
$_SESSION['__auth'] = array(
|
||||||
'authenticated' => true,
|
'authenticated' => true,
|
||||||
'userId' => $_SESSION['username'],
|
'userId' => $_SESSION['username'],
|
||||||
|
|
Loading…
Add table
Reference in a new issue