protected function afterValidate() { parent::afterValidate(); $this->password = $this->encrypt($this->password); }