function imce_update_roles in IMCE 6
Same name and namespace in other branches
- 6.2 inc/imce.admin.inc \imce_update_roles()
- 7 inc/imce.admin.inc \imce_update_roles()
Update role-profile assignments.
1 call to imce_update_roles()
- imce_update_profiles in inc/
admin.inc - Add, update or delete a profile.
File
- inc/
admin.inc, line 536
Code
function imce_update_roles($pid) {
$roles = variable_get('imce_roles_profiles', array());
foreach ($roles as $rid => $role) {
if ($role['pid'] == $pid) {
$roles[$rid]['pid'] = 0;
}
else {
if ($role['pid'] > $pid) {
$roles[$rid]['pid']--;
}
}
}
variable_set('imce_roles_profiles', $roles);
}