aboutsummaryrefslogtreecommitdiff
path: root/actions/friendrequest/decline.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-12-08 19:15:33 +0100
committerSem <sembrestels@riseup.net>2011-12-08 19:15:33 +0100
commit5c4dc1474ae89437f52101039f1452c267c252a7 (patch)
treed79e54a330b9682f635b21bafbce58157fe45650 /actions/friendrequest/decline.php
parentf14c7d977d57e7a2cca8bff8931a56fe405cf50c (diff)
downloadelgg-5c4dc1474ae89437f52101039f1452c267c252a7.tar.gz
elgg-5c4dc1474ae89437f52101039f1452c267c252a7.tar.bz2
Added friend/remove and friendrequest/decline actions.
Diffstat (limited to 'actions/friendrequest/decline.php')
-rwxr-xr-xactions/friendrequest/decline.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/actions/friendrequest/decline.php b/actions/friendrequest/decline.php
new file mode 100755
index 000000000..5b48acfb4
--- /dev/null
+++ b/actions/friendrequest/decline.php
@@ -0,0 +1,12 @@
+<?php
+
+$user = elgg_get_logged_in_user_entity();
+$friend = get_entity(sanitize_int(get_input("guid")));
+
+if(remove_entity_relationship($friend->guid, 'friendrequest', $user->guid)) {
+ system_message(elgg_echo("friendrequest:remove:success"));
+} else {
+ system_message(elgg_echo("friendrequest:remove:fail"));
+}
+
+forward(REFERER);