Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Q2A Core by
I have a site set up with LDAP.  It works great for most North American names.  

Unfortunately, we have several staff with names longer than 20 characters.  Besides widening the qa_users.handle field, any suggestions for what else I should be looking at to get the Q2A core to work with a wider handle (say 64 chars)?
Q2A version: 1.5.4
Any suggestions anyone?  I suspect that this is messing up a number of other users as well.
How does your integration work? Are you using a login module? Q2A's character limit shouldn't matter.

1 Answer

+3 votes
selected by
Best answer

In qa-include\plugins\qa-filter-basic.php (around line 52)

if (qa_strlen($handle) > QA_DB_MAX_HANDLE_LENGTH) {
    return qa_lang_sub('main/max_length_x', QA_DB_MAX_HANDLE_LENGTH);

This means, it gets the values from QA_DB_MAX_HANDLE_LENGTH.

There are two things you should do.

  1. Change the handle field in the user table.
    • Go to phpMyAdmin (or equivalent) and locate the table named <prefix>_users (i.e.qa_users)
    • Change the length of the field named "handle" to the desired length
  2. define the value for QA_DB_MAX_HANDLE_LENGTH
    • Locate the config file and add the following line.
    • define('QA_DB_MAX_HANDLE_LENGTH', 64);