function config_perms_loadperms in Custom Permissions 7.2
Load all permissions
1 call to config_perms_loadperms()
- config_perms_cache_rebuild in ./
config_perms.module - Configure permission names for urls:
File
- ./
config_perms.module, line 142 - Allows additional permissions to be created and managed through a administration form
Code
function config_perms_loadperms() {
$perms = array();
if (module_exists('ctools')) {
ctools_include('export');
$perms = ctools_export_load_object('config_perms');
}
else {
$result = db_select('config_perms')
->fields('config_perms')
->execute();
foreach ($result as $perm) {
$perm->path = unserialize($perm->path);
$perms[$perm->machine_name] = $perm;
}
}
return $perms;
}