public function __construct()
 {
     parent::__construct();
     $ldapOpts = $this->_config->ldap->params;
     if ($ldapOpts == null) {
         throw new Exception('LDAP options not configured.', 102);
     }
     $ldapOpts = $ldapOpts->toArray();
     $ldapOpts['bindRequiresDn'] = true;
     $this->_ldap = new Zend_Ldap($ldapOpts);
     $this->_smbHash = new UTS_Auth_Session_SmbHash();
 }
 public function __construct()
 {
     parent::__construct();
     $rules = $this->_config->session->ldappermission->rule;
     if (!$rules) {
         throw new Exception("No LDAP permission rules defined.", 105);
     }
     $this->_filterRules = array();
     foreach ($rules->toArray() as $r) {
         array_push($this->_filterRules, new Sahara_Auth_Session_LdapPermission_Rule($r));
     }
     $this->_db = Sahara_Database::getDatabase();
 }
 public function __construct()
 {
     parent::__construct();
     /* Load configuration rules. */
     if ($rules = $this->_config->moodle->authorise_rule) {
         if ($rules instanceof Zend_Config) {
             foreach ($rules->toArray() as $r) {
                 $this->_parseRule($r);
             }
         } else {
             if (is_array($rules)) {
                 foreach ($rules as $r) {
                     $this->_parseRule($r);
                 }
             } else {
                 $this->_parseRule($rules);
             }
         }
     }
     $this->_tblPrefix = $this->_config->moodle->database->prefix ? $this->_config->moodle->database->prefix : '';
 }
 public function __construct()
 {
     parent::__construct();
     $this->_db = Sahara_Database::getDatabase();
     $ud = $this->_config->userdetails;
     if (!$ud || !$ud->firstname || !$ud->lastname || !$ud->email) {
         $this->_logger->error('User details session setup class not properly configured.');
         throw new Exception('User details session setup class not properly configured.');
     }
     $this->_fnFields = array();
     foreach (explode(',', $ud->firstname) as $f) {
         array_push($this->_fnFields, trim($f));
     }
     $this->_snFields = array();
     foreach (explode(',', $ud->lastname) as $f) {
         array_push($this->_snFields, trim($f));
     }
     $this->_emailFields = array();
     foreach (explode(',', $ud->email) as $f) {
         array_push($this->_emailFields, trim($f));
     }
 }
 public function __construct()
 {
     parent::__construct();
     $this->_db = Sahara_Database::getDatabase();
 }