Elgg  Version 6.1
MemberPermissionsHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Groups;
4 
11 
19  public function __invoke(\Elgg\Event $event) {
20 
21  $container = $event->getParam('container');
22  if (!$container instanceof \ElggGroup) {
23  return;
24  }
25 
26  $user = $event->getUserParam();
27  if (!$user instanceof \ElggUser) {
28  return;
29  }
30 
31  if ($container->isMember($user)) {
32  return true;
33  }
34  }
35 }
__invoke(\Elgg\Event $event)
Allow group members to write to the group container.
Check if content can be created in a group based on group membership of a user.
$user
Definition: ban.php:7
$container
Definition: delete.php:23
Models an event passed to event handlers.
Definition: Event.php:11