[dev] Re: [mimp]MIMP/Horde login questions
Chuck Hagenbuch
chuck at horde.org
Fri Dec 13 09:03:58 PST 2002
Quoting Eric Rostetter <eric.rostetter@physics.utexas.edu>:
> So the question is, how can I go about modifying/configuring Horde so it
> recognizes the wap/wml/etc connections, and acts appropriately for them?
> Any work done on this at all, or does it need to be started from scratch?
> Or am I just way off base here?
Not at all - you're just missing a poorly documented trick. ;)
This is a simplified version of my auth configuration in horde/config/conf.php:
$conf['auth']['driver'] = 'composite';
$conf['auth']['params'] = array(
'drivers' => array('imp' => array('driver' => 'application',
'params' => array('app' => 'imp')),
'mimp' => array('driver' => 'application',
'params' => array('app' => 'mimp')),
'loginscreen_switch' => '_horde_select_loginscreen',
);
if (!function_exists('_horde_select_loginscreen')) {
function _horde_select_loginscreen()
{
require_once HORDE_BASE . '/lib/Browser.php';
$browser = &new Browser();
if ($browser->isMobile()) {
return 'mimp';
}
return 'imp';
}
}
(yes, that's simplified; there are two other drivers in my real one <g>).
Basically, I use the isMobile check in Browser.php to decide whether or not
to return IMP or MIMP for authentication. That make sense/help?
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
"People ask me all the time what it will be like living without otters."
- Google, thanks to Harpers
More information about the dev
mailing list