You need to give more information. The code you showed seems correct. Please show the relation definition in accoun_activation model. Also make sure that there’s really a related record. You could also check the SQL created (configure a CWebLogRoute and enable YII_DEBUG).
As you can see in the posted screenshot (see the first post), there is a related record, and the record is read very fine, as those details are real. But simply when accessing doesn’t return anything.
The relation is defined as:
public function relations() {
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'residence' => array(self::MANY_MANY,'residences', 'user_details(user_id,residence_id)',
'user' => array(self::BELONGS_TO, 'user',
'user_id'),
);
}