}
/**
- * Return the URI of the login screen for this authentication method.
- *
- * @param string $app The application to use.
- * @param string $url The URL to redirect to after login.
- *
- * @return string The login screen URI.
- */
- public function getLoginScreen($app = 'horde', $url = '')
- {
- return parent::getLoginScreen($this->_params['app'], $url);
- }
-
- /**
* List all users in the system.
*
* @return array The array of userIds.
if (Horde_Auth::getAuthError() != Horde_Auth::REASON_MESSAGE) {
Horde_Auth::setAuthError(Horde_Auth::REASON_FAILED);
}
- return false;
+ return $auth;
}
}
}
}
} catch (Horde_Auth_Exception $e) {
- Horde::logMessage($e, __FILE__, __LINE__, PEAR_LOG_DEBUG);
- Horde_Auth::setAuthError($e->getCode() || Horde_Auth::REASON_MESSAGE, $e->getMessage());
+ if ($e->getCode()) {
+ Horde_Auth::setAuthError($e->getCode());
+ } else {
+ Horde_Auth::setAuthError(Horde_Auth::REASON_MESSAGE, $e->getMessage());
+ }
}
return $auth;
}
/**
- * Returns the URI of the login screen for the current authentication
- * method.
- *
- * @param string $app The application to use.
- * @param string $url The URL to redirect to after login.
- *
- * @return string The login screen URI.
- */
- public function getLoginScreen($app = 'horde', $url = '')
- {
- $login = Horde::url($GLOBALS['registry']->get('webroot', $app) . '/login.php', true);
- if (!empty($url)) {
- $login = Horde_Util::addParameter($login, 'url', $url);
- }
- return $login;
- }
-
- /**
* Returns the named parameter for the current auth driver.
*
* @param string $param The parameter to fetch.
}
/**
- * Return the URI of the login screen for this authentication object.
- *
- * @param string $app The application to use.
- * @param string $url The URL to redirect to after login.
- *
- * @return string The login screen URI.
- */
- public function getLoginScreen($app = 'horde', $url = '')
- {
- if (($login_driver = Horde_Auth::getDriverByParam('loginscreen_switch', $this->_params)) &&
- $this->_loadDriver($login_driver)) {
- return $this->_drivers[$login_driver]->getLoginScreen($app, $url);
- }
-
- return parent::getLoginScreen($app, $url);
- }
-
- /**
* Add a set of authentication credentials.
*
* @param string $userId The userId to add.
* Example Usage:
* <pre>
* $conf['auth']['driver'] = 'composite';
- * $conf['auth']['params']['loginscreen_switch'] = '_horde_select_loginscreen';
* $conf['auth']['params']['admin_driver'] = 'cyrus';
* $conf['auth']['params']['drivers']['imp'] = array(
* 'driver' => 'application',
}
/**
- * Return the URI of the login screen for this authentication method.
- *
- * @param string $app The application to use.
- * @param string $url The URL to redirect to after login.
- *
- * @return string The login screen URI.
- */
- public function getLoginScreen($app = 'horde', $url = '')
- {
- return $this->_backend->getLoginScreen($app, $url);
- }
-
- /**
* Checks if a userId exists in the system.
*
* @return boolean Whether or not the userId already exists.
}
/**
- * Return the URI of the login screen for this authentication object.
- *
- * @param string $app The application to use.
- * @param string $url The URL to redirect to after login.
- *
- * @return string The login screen URI.
- */
- public function getLoginScreen($app = 'horde', $url = '')
- {
- if (!empty($this->_params['loginScreen'])) {
- return $url
- ? Horde_Util::addParameter($this->_params['loginScreen'], 'url', $url)
- : $this->_params['loginScreen'];
- }
-
- return parent::getLoginScreen($app, $url);
- }
-
- /**
* List all users in the system.
*
* @return array The array of userIds.