Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
601 views
in Q2A Core by
Q2A version: 1.8.4

1 Answer

+2 votes
by
selected by
 
Best answer

Add this to your qa-config.php:

define('QA_DB_MAX_HANDLE_LENGTH', 30);

Preferably you should do this before creating the database. If you already have a working site you'll need to manually update the "handle" field in your users table (qa_users) to match the length you put in there, e.g. VARCHAR(30). Also do the same for eventlog if you have that table.

by
Can I change the minimum length of string? Q2A can be registered using a single letter or numbers. I would like at least 3 characters of username. Thank you.
by
+2
Not as easily, no. The current min length of 0 is checked in qa-include/plugins/qa-filter-basic.php. You could change
    if (!strlen($handle)) {
to
    if (strlen($handle) <= 3) {

The best way to do it, to avoid overwiting it on Q2A updates, would be creating your own filter plugin, see http://docs.question2answer.org/plugins/modules-filter/
by
Thanks bro, I was able to do it.
...