[horde] composite driver

Ilya mail at krel.org
Mon Sep 2 23:02:33 PDT 2002


I give up for today, I cant get login working with composite driver.
If you have any suggestions, please shoot my way.
 I know it fails here:
    function _authenticate($userID, $credentials)
    {
        if (($auth_driver = Auth::_getDriverByParam('loginscreen_switch',
$this->_params)) &&
                $this->_loadDriver($auth_driver)) {
            return $this->_drivers[$auth_driver]->authenticate($userID,
$credentials);
    }

i think what happens is that _getDriverByParam('loginscreen_switch',
$this->_params)  is called from Auth.php, it does

function _getDriverByParam($name, $params, $driverparams = array())
    {
        if (array_key_exists($name, $params) &&   // Success
            function_exists($params[$name])) {   // Fail - the
_horde_select_loginscreen is only available in cyrsql and it is not loaded
at this time
            return call_user_func_array($params[$name], $driverparams);
        }




my config now looks like this:

$conf['auth']['driver'] = 'composite';
$conf['auth']['params'] = array();
$conf['auth']['params']['drivers'] = array();
$conf['auth']['params']['app'] = 'imp';
$conf['auth']['params']['drivers']['cyrsql']['phptype'] = 'mysql';
$conf['auth']['params']['drivers']['cyrsql']['hostspec'] = 'localhost';
//sql hostname
$conf['auth']['params']['drivers']['cyrsql']['protocol'] = 'tcp';
$conf['auth']['params']['drivers']['cyrsql']['username'] = 'horde'; //sql
username
$conf['auth']['params']['drivers']['cyrsql']['password'] = 'horde'; //sql
password
$conf['auth']['params']['drivers']['cyrsql']['database'] = 'horde'; //sql
database
$conf['auth']['params']['drivers']['cyrsql']['cyradmin'] = 'cyradmin';
//imap admin username
$conf['auth']['params']['drivers']['cyrsql']['cyrpass'] = 'cyrpass'; //imap
admin password
$conf['auth']['params']['drivers']['cyrsql']['imaps'] =
'{localhost:993/imap/ssl/novalidate-cert}';//imap server
$conf['auth']['params']['admin_driver'] = 'cyrsql';
$conf['auth']['params']['loginscreen_switch'] = '_horde_select_loginscreen';

and I also added this function in the end of cyrsql.php (Chuck you said it
can simply return sql, but shouldnt it be cyrsql in my case?):
function _horde_select_loginscreen() {
                return 'sql';
        }



More information about the horde mailing list