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

1 Answer

+2 votes
selected by
Best answer

Change the value of the field level in the table qa_users for the user in question. For example, the following SQL statement will grant admin privileges to the user with the ID 42:

UPDATE qa_users SET level=100 WHERE userid=42;

Adjust privilege level and user ID as needed.

Alternatively you could change the level by username instead of by user ID like this:

UPDATE qa_users SET level=100 WHERE handle='someusers';

However, the username may not be unique, so I wouldn't recommend doing that as you might inadvertently grant somebody else elevated privileges.

The privilege levels are defined in the file qa-include/app/users.php in your Q2A application directory. Admin level is 100, moderator level is 80.