public function getIsGuest() { $customer = Customer::model()->findByPk($this->id); if ($customer !== null) { return CPropertyValue::ensureInteger($customer->record_type) === Customer::GUEST; } return parent::getIsGuest(); }