public function beforeValidate()
 {
     if ($this->isNewRecord) {
         $this->creado = new CDbExpression('NOW()');
     }
     $this->modificado = new CDbExpression('NOW()');
     return parent::beforeSave();
 }
Example #2
0
 public function beforeSave()
 {
     $this->password = $this->hashPassword($this->password, $this->salt);
     return parent::beforeSave();
 }