diff options
Diffstat (limited to 'mod/friendrequest/actions/friendrequest/decline.php')
-rw-r--r-- | mod/friendrequest/actions/friendrequest/decline.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mod/friendrequest/actions/friendrequest/decline.php b/mod/friendrequest/actions/friendrequest/decline.php new file mode 100644 index 000000000..ca3f1c9e4 --- /dev/null +++ b/mod/friendrequest/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:decline:success", array($friend->name)));
+} else {
+ system_message(elgg_echo("friendrequest:decline:fail"));
+}
+
+forward(REFERER);
|