public function GroupRole::revokePermissions in Group 7
Revoke permissions from a role.
Parameters
array $permissions: (optional) A list of permission names to revoke. Will revoke all permissions from the group role if $permissions is left blank.
1 call to GroupRole::revokePermissions()
- GroupRole::changePermissions in classes/
group_role.inc - Change permissions for a role.
File
- classes/
group_role.inc, line 78 - Defines the Entity API class for group roles.
Class
- GroupRole
- Main class for group role entities.
Code
public function revokePermissions(array $permissions = array()) {
$this->permissions = !empty($permissions) ? array_values(array_diff($this->permissions, $permissions)) : array();
$this
->save();
}