{% local reportee local reported = nil if verified and verified.privs >= DB.USER_PRIVS_APPROVED then local reporteeid = tonumber(request:path():match"/reportuser/(%d+)") reportee = reporteeid and DB.getuserbyid(reporteeid) if reportee then title = "Report user " .. Escapes.htmlescape(reportee.displayname) if request:post() and request:post().csrf and DB.csrfverify(verified.id, Escapes.urlunescape(request:post().csrf)) and request:post().wtf and not request:post().wtf:match"^%s*$" and #request:post().wtf <= BigGlobe.MAX_COMMENT_SIZE then reported = DB.addreport(verified.id, reporteeid, Escapes.urlspunescape(request:post().wtf)) end else title = "User not found" end else title = "Unverified" end %} {% function content() %} {% if reported == nil then %} {% if verified and verified.privs >= DB.USER_PRIVS_APPROVED then %}

Reporting user "{{ Escapes.htmlescape(reportee.displayname) }}"

{{ BigGlobe.cfg.ruleset }}
{% else %}

You must be an approved member to report users.

{% end %} {% elseif reported then %}

Reported.

{% else %}

Failed to report.

{% end %} {% end %} {# base.inc