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