public function insert()
 {
     if (null === $this->time_recorded) {
         $this->time_recorded = standard_date('DATE_ISO8601', time());
     }
     parent::insert();
 }
示例#2
0
 public function store($update_nulls = false)
 {
     if (false === empty($this->password)) {
         $salt = $this->_generateSalt(8);
         $salted_password = md5($this->password . $salt);
         $this->password = $salted_password . ':' . $salt;
     }
     parent::store($update_nulls);
 }
示例#3
0
 public function __construct($id = null)
 {
     parent::__construct('badges', 'id', $id);
 }
 public function update($update_null_values = false)
 {
     $this->last_modified = standard_date('DATE_ISO8601', time());
     parent::update($update_null_values);
 }