function imce_update_roles in IMCE 6.2
Same name and namespace in other branches
- 6 inc/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/
imce.admin.inc - Add, update or delete a profile.
File
- inc/
imce.admin.inc, line 579 - Serves administration pages of IMCE.
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;
}
elseif ($role['pid'] > $pid) {
$roles[$rid]['pid']--;
}
}
variable_set('imce_roles_profiles', $roles);
}