Error: DB Custom script (Login): user_id is invalid

Problem statement

Error: DB Custom script (Login): user_id is invalid shown on a connection that has not had any changes to login script.

Solution

Check that import mode has not been recently toggled on for a legacy database, and that the external database is providing the user_id in string format, not integer for example.