function hook_og_user_access_alter in Organic groups 7
Same name and namespace in other branches
- 8 og.api.php \hook_og_user_access_alter()
- 7.2 og.api.php \hook_og_user_access_alter()
Alter the permissions of a user in a group.
Parameters
$perm: The permissions of a user, passed by reference.
$context: Array with:
- string: The permission asked for the user.
- group: The group object.
- account: The user account.
1 function implements hook_og_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.
- og_ui_og_user_access_alter in og_ui/
og_ui.module - Implements hook_og_user_access_alter().
1 invocation of hook_og_user_access_alter()
- og_user_access in ./
og.module - Determine whether a user has a given privilege.
File
- ./
og.api.php, line 192 - Hooks provided by the Organic groups module.
Code
function hook_og_user_access_alter(&$perm, $context) {
// If user ID 2 doesn't already have a permission then enable it.
if (empty($perm['foo']) && ($context['account']->uid = 2)) {
$perm['foo'] = TRUE;
}
}