Exemple #1
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);
 }