示例#1
0
 /**
  * Loads user record.
  *
  * @access public
  * @param integer $pm_user_id User id to load. If you pass a string instead of an integer, the record with a user name matching the string will be loaded.
  * @return bool Returns true if no error, false if error occurred
  */
 public function load($pm_user_id = null, $pb_use_cache = false)
 {
     if (is_numeric($pm_user_id)) {
         $vn_rc = parent::load($pm_user_id);
     } else {
         if (is_array($pm_user_id)) {
             $vn_rc = parent::load($pm_user_id);
         } else {
             $vn_rc = parent::load(array("user_name" => $pm_user_id));
         }
     }
     # load user vars (the get() method automatically unserializes the data)
     $this->opa_user_vars = $this->get("vars");
     $this->opa_volatile_user_vars = $this->get("volatile_vars");
     if (!isset($this->opa_user_vars) || !is_array($this->opa_user_vars)) {
         $this->opa_user_vars = array();
     }
     if (!isset($this->opa_volatile_user_vars) || !is_array($this->opa_volatile_user_vars)) {
         $this->opa_volatile_user_vars = array();
     }
     return $vn_rc;
 }
示例#2
0
 /**
  *
  */
 public function load($pm_id = null, $pb_use_cache = true)
 {
     $vn_rc = parent::load($pm_id, $pb_use_cache);
     $this->setOrderStatusDropDown();
     return $vn_rc;
 }
 public function load($pm_id = null, $pb_use_cache = true)
 {
     $this->init();
     $this->setFieldValuesArray(array());
     if ($vn_c = parent::load($pm_id, $pb_use_cache)) {
         // Copy attributes into field values array in BaseModel
         //$this->setFieldValuesArray($this->addAttributesToFieldValuesArray());
     }
     return $vn_c;
 }
示例#4
0
 function load($id)
 {
     $result = parent::load($id);
     $this->afterLoad();
     return $result;
 }