aboutsummaryrefslogtreecommitdiff
path: root/actions/friends/add.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/friends/add.php')
-rw-r--r--actions/friends/add.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/actions/friends/add.php b/actions/friends/add.php
index 702a384d3..5d4ecc078 100644
--- a/actions/friends/add.php
+++ b/actions/friends/add.php
@@ -9,7 +9,8 @@ if(!elgg_instanceof($friend, 'user')){
}
if(check_entity_relationship($friend->guid, "friendrequest", $user->guid)
- || check_entity_relationship($friend->guid, "friend", $user->guid)) {
+ || check_entity_relationship($friend->guid, "friend", $user->guid)) {
+
$user->addFriend($friend->guid);
remove_entity_relationship($friend->guid, "friendrequest", $user->guid);