I need to manipulate a model before it is used. I think the best place is the afterConstruct() method, but it doesn’t appear to fire. What am I missing with afterConstruct()?
Here’s my code:
class Account extends CActiveRecord
public function afterConstruct()
$this->AccountKey = "TEST"; return parent::afterConstruct();