aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/users.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/users.php')
-rw-r--r--engine/lib/users.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php
index e29a920ff..3bb1d0da8 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -440,7 +440,7 @@
$friend_guid = (int) $friend_guid;
if (!$friend = get_entity($friend_guid)) return false;
if (!$user = get_entity($user_guid)) return false;
- if (get_class($user) != "ElggUser" || get_class($friend) != "ElggUser") return false;
+ if ( (!($user instanceof ElggUser)) || (!($friend instanceof ElggUser)) ) return false;
return add_entity_relationship($user_guid, "friend", $friend_guid);
}