Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
805 views
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
by
Any suggestions anyone?  I suspect that this is messing up a number of other users as well.
by
How does your integration work? Are you using a login module? Q2A's character limit shouldn't matter.
by
Note that the handle in table "qa_users" is VARCHAR(20), that must be changed to your new length, otherwise handles get cut off after 20 chars.

@Scott:
1. Why was the decision 20 chars?
2. Any other consequences (performance or ...) when changing to e.g. 40?

1 Answer

+3 votes
by
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);
...