Exemplo n.º 1
0
 /**
  * 返回数值
  *
  * @return array
  */
 public function as_array()
 {
     $arr = parent::as_array();
     unset($arr['password']);
     unset($arr['rand_code']);
     unset($arr['perm_setting']);
     return $arr;
 }
Exemplo n.º 2
0
 /**
  * 插入用户数据
  *
  * @see \OOP_ORM_Data::insert()
  */
 public function insert()
 {
     # 生成一个加密随机码
     $this->rand_code = $this->_get_password_rand_code();
     # 加密密码
     $this->password = $this->_get_password_hash($this->password);
     return parent::insert();
 }