From 12b9d4346f75027d3a4f804db72222fbe2282e5d Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 26 Jan 2009 14:29:31 +0100 Subject: Warn not-logged-in users when they try to send a message --- actions/newmessage.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actions') diff --git a/actions/newmessage.php b/actions/newmessage.php index 609577db5..38e70c90d 100644 --- a/actions/newmessage.php +++ b/actions/newmessage.php @@ -98,6 +98,11 @@ class NewmessageAction extends Action $user = common_current_user(); + if (!$user) { + $this->clientError(_('Only logged-in users can send direct messages.'), 403); + return false; + } + $this->content = $this->trimmed('content'); $this->to = $this->trimmed('to'); -- cgit v1.2.3-54-g00ecf