Skip to content
Snippets Groups Projects
Commit a93d4dd9 authored by Tim Steiner's avatar Tim Steiner
Browse files

Move some settings into a config file where they should have been from originally.

parent a42573c1
Branches
No related tags found
No related merge requests found
......@@ -191,14 +191,16 @@ class Auth_UserModel extends Unl_Model {
*/
public function fetchNewFromLdap($userName)
{
$config = Zend_Registry::get('config')->ldap->toArray();
$user = self::findByUsername($userName);
if ($user) {
return $user;
}
if (!self::$_ldap) {
self::$_ldap = new Unl_Ldap('ldap://localhost:10389');
self::$_ldap->bind('uid=fpatrack,ou=service,dc=unl,dc=edu', 'eziehuoz');
self::$_ldap = new Unl_Ldap($config['uri']);
self::$_ldap->bind($config['dn'], $config['password']);
}
$person = self::fetchNew();
......
......@@ -2,7 +2,7 @@
$startTime = microtime(true);
define('APPLICATION_DIR', '../application');
define('APPLICATION_DIR', dirname(__FILE__) . '/../application');
define('MODULES_DIR', APPLICATION_DIR . '/modules');
set_include_path(get_include_path() . PATH_SEPARATOR . '../library');
......@@ -45,6 +45,8 @@ $db->getProfiler()->setEnabled(true);
$scheduleDb = Zend_Db::factory($config->scheduleDb);
Zend_Registry::set('scheduleDb', $scheduleDb);
Zend_Registry::set('config', $config);
Zend_Layout::startMvc();
$layout = Zend_Layout::getMvcInstance();
$layout->setLayoutPath(MODULES_DIR . '/default/views/scripts');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment