Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+6 votes
in Q2A Core by
edited by
As admin, I may require to answer queries from multiple users.

Is it possible to remove number of private message limit only for Admin?
Q2A version: 1.7.4

1 Answer

+4 votes
selected by
Best answer

Good catch. Maybe the admin should be removed from all limits but that would affect more things than expected. So to keep the change small you can do this:

1. Locate this line: https://github.com/q2a/question2answer/blob/4fce0eb2390f56b645dad375d1d81e9f91a97e69/qa-include/pages/message.php#L78

2. Insert a new line immediately below it with this text:

if (qa_get_logged_in_level() < QA_USER_LEVEL_ADMIN)

The result in context should be:

switch (qa_user_permit_error(null, QA_LIMIT_MESSAGES)) {
    case 'limit':
        if (qa_get_logged_in_level() < QA_USER_LEVEL_ADMIN)
            $pageerror = qa_lang_html('misc/message_limit');

@pupi1985, Thanks for the fix.