public function setAttribute($userId, $name, $value)
    {
        $row = $this->connection->fetchAssoc('SELECT id FROM fusio_user_attribute WHERE name = :name', ['name' => $name]);

        if (empty($row)) {
            $this->connection->insert('fusio_user_attribute', [
                'user_id' => $userId,
                'name' => $name,
                'value' => $value,
            ]);
        } else {
            $this->connection->update('fusio_user_attribute', [
                'user_id' => $userId,
                'name' => $name,
                'value' => $value,
            ], [
                'id' => $row['id']
            ]);
        }
    }