config->get('kolab'); $conf['kolab']['ldap']['server'] = 'ldap://' . $_SESSION['imap_host'] . ':389'; $conf['kolab']['imap']['server'] = $_SESSION['imap_host']; $conf['kolab']['imap']['port'] = $_SESSION['imap_port']; // pass the current IMAP authentication credentials to the Horde auth system self::$horde_auth = Auth::singleton('kolab'); if (self::$horde_auth->authenticate($_SESSION['username'], array('password' => ($pwd = $rcmail->decrypt($_SESSION['password']))), false)) { $_SESSION['__auth'] = array( 'authenticated' => true, 'userId' => $_SESSION['username'], 'timestamp' => time(), 'remote_addr' => $_SERVER['REMOTE_ADDR'], ); Auth::setCredential('password', $pwd); } } }