Example #1
0
 public function init()
 {
     $data = $this->getRequestJson();
     if (!$data) {
         $data = $this->getRequest();
     }
     if (array_key_exists('session_uuid', $data)) {
         if (!Zend_Session::isStarted()) {
             Glo_Auth_Storage_Session::setId($data['session_uuid']);
             $storage = new Glo_Auth_Storage_Session('Glo_Auth');
             $sessoinData = $storage->read();
             if (!is_object($sessoinData) || !isset($data['user_uuid']) || $sessoinData->user_uuid != $data['user_uuid']) {
                 throw new Glo_Exception_InvalidSession('Your session is invalid.');
             }
         }
     }
     /*         $this->loggedInUser = App_Model_User::getLoggedIn(); */
     return parent::init();
     /*
             // load the logged in user if there is one
             $this->view->loggedInUser = User::getLoggedIn();
             
             // set the translate adapter
             $this->registerTranslator();
     */
 }
Example #2
0
 public static function setId($id)
 {
     self::$_id = $id;
     return;
 }