INSERT INTO userman_users (username, auth, description)

SELECT du.extension, '1', 'FPBX GQL Fix. Thanks Sangoma.'
FROM discord_users du
LEFT JOIN userman_users uu
    ON uu.username = du.extension
WHERE uu.username IS NULL;

-- Some context for those wondering why this is here.
-- FreePBX's GraphQL API, for some reason, REQUIRES a userman user to exist for each extension before it'll allow you to update the name or password via GraphQL.
-- Fuck FreePBX GQL.