27 require_once
"Auth/Container.php";
31 require_once
"PEAR.php";
110 PEAR::raiseError(
'The options for Auth_Container_Multiple must be an array');
113 PEAR::raiseError(
'You must define at least one sub container to use in Auth_Container_Multiple');
116 if (!isset($option[
'type'])) {
142 foreach ($this->options as $key =>
$options) {
146 if (isset($this->containers[$key]) && is_a($this->containers[$key],
'Auth_Container')) {
148 $container = &$this->containers[$key];
152 $this->containers[$key] = &$this->_auth_obj->_factory(
$options[
'type'],
$options[
'options']);
154 $container = &$this->containers[$key];
158 $result = $container->fetchData($user,
$pass);
162 $this->
log(
'Container '.$key.
': '.$result->getMessage(), AUTH_LOG_ERR);
165 } elseif ($result ==
true) {
167 $this->
log(
'Container '.$key.
': Authentication successful.', AUTH_LOG_DEBUG);
172 $this->
log(
'Container '.$key.
': Authentication failed.', AUTH_LOG_DEBUG);
178 $this->
log(
'Auth_Container_Multiple: All containers rejected user credentials.',
AUTH_LOG_DEBUG);