aboutsummaryrefslogtreecommitdiff
path: root/actions/friends
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2012-02-08 07:55:33 -0500
committerCash Costello <cash.costello@gmail.com>2012-02-08 07:55:33 -0500
commitbdb32999ac9bcdce8803868fb7f400ddc8db8cbd (patch)
tree0c5adbfadadb28f1727b7b2dcad0fb6768cea8b0 /actions/friends
parent485b4fc40630cec16c5fac889105523a3ce4f23b (diff)
downloadelgg-bdb32999ac9bcdce8803868fb7f400ddc8db8cbd.tar.gz
elgg-bdb32999ac9bcdce8803868fb7f400ddc8db8cbd.tar.bz2
Fixes #4348 adds check for missing user when friending
Diffstat (limited to 'actions/friends')
-rw-r--r--actions/friends/add.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/actions/friends/add.php b/actions/friends/add.php
index 7d38674c1..d1800ee14 100644
--- a/actions/friends/add.php
+++ b/actions/friends/add.php
@@ -9,6 +9,10 @@
// Get the GUID of the user to friend
$friend_guid = get_input('friend');
$friend = get_entity($friend_guid);
+if (!$friend) {
+ register_error(elgg_echo('error:missing_data'));
+ forward(REFERER);
+}
$errors = false;