aboutsummaryrefslogtreecommitdiff
path: root/actions/friendrequest/decline.php
blob: ca3f1c9e49a7fb3f22f0c0aa9f9d49fc137175d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
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);