Elgg  Version 6.0
CreateAclHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Friends;
4 
11 
19  public function __invoke(\Elgg\Event $event) {
20  $user = $event->getObject();
21  if (!$user instanceof \ElggUser) {
22  return;
23  }
24 
25  elgg_create_access_collection('friends', $user->guid, 'friends');
26  }
27 }
Creates ACL for friends.
$user
Definition: ban.php:7
elgg_create_access_collection(string $name, int $owner_guid=0, string $subtype=null)
Creates a new access collection.
Definition: access.php:147
__invoke(\Elgg\Event $event)
Creates a Friends ACL for a user.
Models an event passed to event handlers.
Definition: Event.php:11