Elgg  Version master
ContainerPermissionsHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Comments;
4 
11 
22  public function __invoke(\Elgg\Event $event) {
23 
24  // is someone trying to comment, if so override permissions check
25  if ($event->getParam('subtype') === 'comment' && $event->getUserParam() instanceof \ElggUser) {
26  return true;
27  }
28  }
29 }
__invoke(\Elgg\Event $event)
Allow users to comment on entities not owned by them.
Models an event passed to event handlers.
Definition: Event.php:11