20 $relationship_object = $event->getObject();
25 if ($relationship_object->relationship !==
'friend') {
30 $friend =
get_user($relationship_object->guid_two);
32 if (!
$user || !$friend) {
36 $acl =
$user->getOwnedAccessCollection(
'friends');
41 $acl->removeMember($friend->guid);
__invoke(\Elgg\Event $event)
Add the friend to the user friends ACL.
get_user(int $guid)
Elgg users Functions to manage multiple or single users in an Elgg install.
Models an event passed to event handlers.