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