[dev] Horde from outside application

Jan Schneider jan at horde.org
Sat Nov 5 02:59:50 PST 2005


Zitat von Mini Chate <ctroup at uwo.ca>:

> Hello,
> I'm stuck on how to access the Auth::isAuthenticated() value from
> applications outside of Horde.
>
> The Wiki has some information (http://wiki.horde.org/Doc/Dev/LegacyApps) but
> it didn't work for me. I'm using the following code:
>
> define('HORDE_BASE', dirname(__FILE__) . "/../horde");
> require_once HORDE_BASE . '/lib/core.php';
>
> $registry = &Registry::singleton();
> $auth = &Auth::singleton($conf['auth']['driver']);
>
> $var = $auth->isAuthenticated();
>
> Not only does it not get the correct true/false value for if the user is
> logged in, but it resets the login credentials and logs the user out of
> Horde.

Make sure that both Horde and your website/application are below the 
webroot that you entered in the cookie configuration for Horde.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list