Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
in Q2A Core by


I am setting up q2a with SSO with our application. I set VARCHAR(256) for qa_get_mysql_user_column_type, run the software, and the implement all the other functions of the qa-external-users.php. I'm using the unique user name from our database as the user identifier.

The SSO seems to work - I see the currently logged in user appear. However, if I try to ask a question, I get the following error (the question appear later, just this pesky error screen appears as a result):


Question2Answer query failed:

INSERT INTO qa_sharedevents (entitytype, entityid, questionid, lastpostid, updatetype, lastuserid, updated) VALUES ('U', 'jonne.deprez', 2, 2, NULL, 'jonne.deprez', NOW())

Error 1366: Incorrect integer value: 'jonne.deprez' for column 'entityid' at row 1

Is there something I'm doing wrong?




Q2A version: 1.5.2

1 Answer

+1 vote
selected by
Best answer

Thanks for this - I think it's a straightforward bug with external user integration if user IDs are not numerical values, which seems to be not so commonly used.

You should be able to fix it by making this change in function qa_create_event_for_q_user(...) in qa-app-events.php:

if (isset($lastuserid))

... becomes ...

if (isset($lastuserid) && !QA_FINAL_EXTERNAL_USERS)

Please let me know if this fixes the problem. The fix will be rolled into Q2A 1.5.3.

Yep! That fixed it, thanks so much.