ExternalAuthentication: Move authenticationMode to config.ini

fixes #6214
This commit is contained in:
Marius Hein 2014-06-03 15:26:15 +02:00
parent 9b5c704da8
commit a0459d0172

View File

@ -215,10 +215,10 @@ class Web extends ApplicationBootstrap
} }
try { try {
$config = Config::app('authentication'); $config = Config::app();
} catch (NotReadableError $e) { } catch (NotReadableError $e) {
Logger::error( Logger::error(
new Exception('Cannot load authentication configuration. An exception was thrown:', 0, $e) new Exception('Cannot load global configuration (config.ini). An exception was thrown:', 0, $e)
); );
$config = null; $config = null;
} }
@ -227,6 +227,7 @@ class Web extends ApplicationBootstrap
$config->global->get('authenticationMode', 'internal') === 'external' $config->global->get('authenticationMode', 'internal') === 'external'
) { ) {
$authenticationManager->authenticateFromRemoteUser(); $authenticationManager->authenticateFromRemoteUser();
$this->user = $authenticationManager->getUser();
} }
return $this; return $this;