i added a new column to the user table and model ‘office_id’ but when i try
Yii::$app->user->identity->office_id
its null (i am sure there is a value in the table)
I have added this to User model:
public function getOffice()
{
return $this->hasOne(Office::className(), ['office_id' => 'office_id']);
}
I have other fields, like ->identity->role, ->identity->status that seem to work fine , but as i’ve just added this office_id, have I missed something ?
hey there, just wanted to follow up - it must have been a cache issue, because i went away for the day and when i came back, turned on computer and it just started working as i expected