Exemplo n.º 1
0
 public static function GetUserInstance($pReload = FALSE)
 {
     if ($pReload || is_null(self::$_UserInstance)) {
         // process
         self::$_UserInstance = new self(Zupal_Domain_Abstract::STUB);
     }
     return self::$_UserInstance;
 }
Exemplo n.º 2
0
 public function __construct($pUser = NULL)
 {
     $root = Zend_Controller_Front::getInstance()->getBaseUrl() . DS . 'people' . DS . 'users';
     if (is_numeric($pUser)) {
         $pUser = new Zupal_Users($pUser);
     } elseif (is_null($pUser)) {
         $pUser = new Zupal_Users();
     }
     if ($pUser->identity()) {
         $this->setAction($root . DS . 'updatevalidate');
     } else {
         $this->setAction($root . DS . 'addvalidate');
         $this->submit->setLabel('Create User');
     }
     $ini_path = dirname(__FILE__) . DS . 'Form.ini';
     $config = new Zend_Config_Ini($ini_path, 'fields');
     $this->setMethod('post');
     parent::__construct($config);
     $this->set_domain($pUser);
 }
Exemplo n.º 3
0
 /**
  *
  */
 public function dataAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     echo Zupal_Users::getUserInstance()->render_data(array(), 'username');
 }