You are here

function hook_shoutbox_user_access_alter in Shoutbox 7

Same name and namespace in other branches
  1. 7.2 shoutbox.api.php \hook_shoutbox_user_access_alter()

Alter access to shoutbox.

This is useful for modules customizing access to shoutbox. All shout views, edits, deletes and moderation will go through this function.

Parameters

Boolean $access_granted: The final returned value for access granted or denied.

String $permission: The hook_permission string key to check against.

Object $shout: If applicable, the function will check against the shout.

See also

_shoutbox_user_access().

1 function implements hook_shoutbox_user_access_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

shoutbox_domain_shoutbox_user_access_alter in shoutbox_domain/shoutbox_domain.module
Implements hook_shoutbox_user_access_alter().
1 invocation of hook_shoutbox_user_access_alter()
_shoutbox_user_access in ./shoutbox.module
This function is necessary because even if a user has permission (according to the user_access function), they still should not have some permissions, such as moderating their own posts, etc.

File

./shoutbox.api.php, line 93

Code

function hook_shoutbox_user_access_alter(&$access_granted, $permission, $shout = NULL) {
  if (module_exists('domain')) {
    $access_granted = _shoutbox_domain_user_access();
  }
}