コード例 #1
0
 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;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 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;
 }
コード例 #5
0
 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());
 }
コード例 #6
0
 function __construct($queue_dir = '')
 {
     $this->db = owa_coreAPI::dbSingleton();
     return parent::__construct();
 }
コード例 #7
0
 public static function getEventDispatch()
 {
     if (!class_exists('eventQueue')) {
         require_once OWA_DIR . '/eventQueue.php';
     }
     $eq =& eventQueue::get_instance();
     return $eq;
 }