public function primaryGroup() : ?Model
    {
        if ($this->userPrimaryGroup !== null) {
            return $this->userPrimaryGroup;
        }

        $usergroups = $this->usergroups;

        foreach ($usergroups as $id => $usergroup) {
            if ($usergroup->primary) {
                return $this->userPrimaryGroup = $usergroup->group;
            }
        }

        return $this->userPrimaryGroup = $usergroups[0]->group;
    }