Commit c7734669 authored by Tim Steiner's avatar Tim Steiner
Browse files

Register the application config with Zend_Registry.

parent cf44de48
......@@ -2,13 +2,6 @@
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
/*
protected function _initSession()
{
Zend_Session::start();
}
*/
protected function _initAutoloader()
{
$options = $this->getOptions();
......@@ -33,5 +26,10 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
);
error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ^ E_STRICT);
}
protected function _initConfig()
{
Zend_Registry::set('config', $this->getOptions());
}
}
......@@ -30,6 +30,9 @@ unl.cas.module = auth
unl.cas.controller = index
unl.templates.options.version = 3
unl.templates.options.templatedependentspath = APPLICATION_PATH "/../document_root"
ldap.uri = "ldap://example.com"
ldap.dn = "uid=user,dc=example,dc=com"
ldap.password = "password"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
......
......@@ -191,7 +191,8 @@ class Auth_UserModel extends Unl_Model {
*/
public function fetchNewFromLdap($userName)
{
$config = Zend_Registry::get('config')->ldap->toArray();
$config = Zend_Registry::get('config');
$config = $config['ldap'];
$user = self::findByUsername($userName);
if ($user) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment