function action()
 {
     // Log password reset request to event queue
     $eq =& eventQueue::get_instance();
     $eq->log(array('email_address' => $this->getParam('email_address')), 'base.reset_password');
     // return view
     $this->setView('base.passwordResetForm');
     $email_address = trim($this->getParam('email_address'));
     $msg = $this->getMsg(2000, $email_address);
     $this->set('status_msg', $msg);
     return;
 }
 function action()
 {
     $userManager = owa_coreApi::supportClassFactory('base', 'userManager');
     $user_params = array('user_id' => trim($this->params['user_id']), 'real_name' => $this->params['real_name'], 'role' => $this->params['role'], 'email_address' => trim($this->params['email_address']));
     $temp_passkey = $userManager->createNewUser($user_params);
     // log account creation event to event queue
     $eq =& eventQueue::get_instance();
     $eq->log(array('user_id' => $this->params['user_id'], 'real_name' => $this->params['real_name'], 'role' => $this->params['role'], 'email_address' => $this->params['email_address'], 'temp_passkey' => $temp_passkey), 'base.new_user_account');
     $this->setRedirectAction('base.users');
     $this->set('status_code', 3000);
     return;
 }
 function action()
 {
     $auth =& owa_auth::get_instance();
     $status = $auth->authenticateUserTempPasskey($this->params['k']);
     // log to event queue
     if ($status === true) {
         $eq =& eventQueue::get_instance();
         $new_password = array('key' => $this->params['k'], 'password' => $auth->encryptPassword($this->params['password']), 'ip' => $_SERVER['REMOTE_ADDR']);
         $eq->log($new_password, 'base.set_password');
         $auth->deleteCredentials();
         $this->setRedirectAction('base.loginForm');
         $this->set('status_code', 3006);
     } else {
         $this->setRedirectAction('base.loginForm');
         $this->set('error_code', 2011);
         // can't find key in the db
     }
     return;
 }
 function action()
 {
     $status = $this->installSchema();
     if ($status == true) {
         $this->set('status_code', 3305);
         $password = $this->createAdminUser($this->getParam('email_address'), '', $this->getParam('password'));
         $site_id = $this->createDefaultSite($this->getParam('protocol') . $this->getParam('domain'));
         // Set install complete flag.
         $this->c->persistSetting('base', 'install_complete', true);
         $save_status = $this->c->save();
         if ($save_status == true) {
             $this->e->notice('Install Complete Flag added to configuration');
         } else {
             $this->e->notice('Could not add Install Complete Flag to configuration.');
         }
         // fire install complete event.
         $eq =& eventQueue::get_instance();
         $event = $eq->eventFactory();
         $event->set('u', 'admin');
         $event->set('p', $password);
         $event->set('site_id', $site_id);
         $event->setEventType('install_complete');
         $eq->notify($event);
         // set view
         $this->set('u', 'admin');
         $this->set('p', $password);
         $this->set('site_id', $site_id);
         $this->setView('base.install');
         $this->setSubview('base.installFinish');
         //$this->set('status_code', 3304);
     } else {
         $this->set('error_msg', $this->getMsg(3302));
         $this->errorAction();
     }
     return;
 }
 function logEvent($event_type, $properties)
 {
     if (!class_exists('eventQueue')) {
         require_once OWA_BASE_DIR . '/eventQueue.php';
     }
     $eq =& eventQueue::get_instance();
     if (!is_a($properties, 'owa_event')) {
         $event = owa_coreAPI::supportClassFactory('base', 'event');
         $event->setProperties($properties);
         $event->setEventType($event_type);
     } else {
         $event = $properties;
     }
     return $eq->log($event, $event->getEventType());
 }
 public static function getEventDispatch()
 {
     if (!class_exists('eventQueue')) {
         require_once OWA_DIR . '/eventQueue.php';
     }
     $eq =& eventQueue::get_instance();
     return $eq;
 }