Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Is there a way to hack the wall permission in order to allow an user to post in his/her wall?

+2 votes
asked Feb 6, 2015 in Q2A Core by gunrose
The administrator panel allows the control of wall permissions, but as long as you got a given number of points you can post in any wall. I would like to use differently the wall. I would like to allow each user only to use his wall.

Where should I take a look in order to deal with it?

Any help will be appreciated.
Q2A version: 1.7.0

1 Answer

+2 votes
answered Feb 6, 2015 by pupi1985
selected Feb 7, 2015 by gunrose
Best answer

Inside the case false: here add this if statement so that it looks this way:

if ($fromuserid != $touserid) {
    return qa_html('You can only post on your own wall');
return false;

A better approach would be to create a plugin override for that function and the comparison would be:

if ($baseFunctionResult === false && $fromuserid != $touserid) { ...

commented Feb 7, 2015 by gunrose
Sure! Thank you! I think it is a good opportunity to learn how to override functions using plugins in q2a. If I do that, I will post it in github for everyone.