@@ -785,9 +785,9 @@ class User extends ActiveRecordCommon implements IdentityInterface | |||
public function belongsToUserGroup($userGroupId) | |||
{ | |||
if(!$this->userUserGroup) { | |||
$this->userUserGroup = UserUserGroup::searchAll([ | |||
$this->populateRelation('userUserGroup', UserUserGroup::searchAll([ | |||
'id_user' => $this->id | |||
]) ; | |||
])) ; | |||
} | |||
if($this->userUserGroup) { |