function permissions_lock_get_locked_roles in Permissions Lock 7
Get an array of locked roles
Return value
array
3 calls to permissions_lock_get_locked_roles()
- permissions_lock_form_alter in ./
permissions_lock.module - Implements hook_form_alter().
- permissions_lock_form_validate in ./
permissions_lock.module - Custom validation handler to keep the locked permissions in their current state.
- permissions_lock_settings_form in ./
permissions_lock.module - Settings form to control which permissions and / or roles have to be locked
File
- ./
permissions_lock.module, line 230 - Lock permissions on the permissions administration pages for certain roles
Code
function permissions_lock_get_locked_roles() {
$locked = variable_get('permissions_lock_locked_roles', array());
$locked = array_filter($locked);
$hook_locks = permissions_lock_get_hook_data('role');
if ($hook_locks) {
// alternative method instead of array_merge(), since that doesn't work well with numeric array keys
foreach ($hook_locks as $rid) {
$locked[$rid] = $rid;
}
}
return $locked;
}