MyBB Community Forums

Full Version: Warn on Report
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I know I posted about this before, but I think I understand the plugins and hooks system better plus it was like 6 months ago....

To create a warning for reporting an administrator, I would hook to something such as do_report_start, check if the reporter and reportee is an admin, and if reportee is admin, but reporter is not, I would create a warning entry in the database using the format as done in warnings.php, right?

One thing, how would I get the reportee's information (I can get the reporter through $mybb->user).
You do know you can make it so certain usergroups can't be reported right?
Thats not the goal, even staff makes mistakes, so instead, reporting staff gives the reporter a warning defined by the admin that can be kept if the report is invalid and revoked if the report is valid. Flexibility, you see?

So, how would I get the info on the report?
I can tell you if I visited any forum and got an instant warning for reporting a staff member if they were in the wrong, I would immediately leave, regardless of if the warning would be revoked at a later time. Customer service is more important, especially if you plan to expand your community. Either let them report the content and it gets dealt with on a case by case basis, or don't allow the content to be reported and make the member send a private message to the staff member.
Ok,  I  could add a confirmation perhaps or an annoucement and I'm not saying that report be the first thing to do, pm is always better in this situation. Regardless if you actually like the idea, I would still like to know how I get the information on the report.

Also, the admin or mod wouldn't have to warn the user later --- the warning is already there!
Just globalize and use any of the available info in report.php:
$post for posts: https://github.com/mybb/mybb/blob/featur...rt.php#L54
$user for profiles: https://github.com/mybb/mybb/blob/featur...rt.php#L85
$reputation for reputation: https://github.com/mybb/mybb/blob/featur...t.php#L120

$user already contains usergroup information and the other 2 contain uid/adduid which you can use to query the groups of the reportee.