+@decorate.withfn(decorators.command)\r
+def report_user(request, id):\r
+ user = get_object_or_404(User, id=id)\r
+\r
+ if not request.POST.get('publicmsg', None):\r
+ return render_to_response('users/report_user.html')\r
+\r
+ data = {\r
+ 'publicmsg': request.POST.get('publicmsg', _('N/A')),\r
+ 'reported': user\r
+ }\r
+\r
+ ReportAction(user=request.user, ip=request.META['REMOTE_ADDR']).save(data=data)\r
+\r
+\r
+ return decorators.RefreshPageCommand()\r
+\r
+\r