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
If you have a reward system, points get important.

All version below q2a v1.6.2 give points to a user that asks and answers his own question. This should be prevented.

How can we change the core to not grant points if he answers his own question... ?


This would solve my problem, that users - that found a good answer to their problem - do not have an answer button and cannot post it...

PS: This is implemented in stackoverflow as well: 0 points for answer on own question.
My opinion.
Because own answer is also contribution to knowledge database, I think that user should be able to acquire points. Adding option available to either is good. Than it, I'm worried user can select own answer to own question as best answer. However, points are subtracted from when someone select other member's answer.

2 Answers

0 votes

You could modify the SQL fragment in qa-db-points.php (or better, override the qa_db_points_calculations() function) to exclude users answering their own question. See some of the other SQL fragments in that function for the right kind of structure to use.

+2 votes
<shameless plug>

I wrote a plugin for this a while back: https://github.com/ansgarwiechers/q2a-no-self-accept-points

</shameless plug>