public function isAuthenticated(array $opts = array())
{
global $injector, $session;
$app = empty($opts['app']) ? 'horde' : $opts['app'];
$transparent = intval(empty($opts['notransparent']));
if (isset($this->_cache['isauth'][$app][$transparent])) {
return $this->_cache['isauth'][$app][$transparent];
}
/* Check for cached authentication results. */
if ($this->getAuth() && ($app == 'horde' || $session->exists('horde', 'auth_app/' . $app)) && $this->checkExistingAuth($app)) {
$res = true;
} elseif ($transparent) {
try {
$res = $injector->getInstance('Horde_Core_Factory_Auth')->create($app)->transparent();
} catch (Horde_Exception $e) {
Horde::log($e);
$res = false;
}
} else {
$res = false;
}
$this->_cache['isauth'][$app][$transparent] = $res;
return $res;
}