public function assign($user, bool $primary = false): bool
    {
        if ($this->limitExceeded()) {
            return false;
        }

        $this->users()->attach($user);

        // Set user's primary group
        if ($primary) {
            // Get user's model name
            $userModel = config('auth.providers.users.model');

            // In case $user is an integer, find the relevant model record
            if (is_int($user)) {
                $user = $userModel::find($user);
            }

            $user->primary_group_id = $this->id;
            $user->save();
        }

        return true;
    }