Project

General

Profile

« Previous | Next » 

Revision 546

Added by doc almost 17 years ago

added the "users in multiple groups" feature (closes parts of ticket #546)

View differences:

save.php
48 48
$results_array = $results->fetchRow();
49 49
$old_admin_groups = explode(',', str_replace('_', '', $results_array['admin_groups']));
50 50
$old_admin_users = explode(',', str_replace('_', '', $results_array['admin_users']));
51
if(!is_numeric(array_search($admin->get_group_id(), $old_admin_groups)) AND !is_numeric(array_search($admin->get_user_id(), $old_admin_users))) {
51
$in_old_group = FALSE;
52
foreach($admin->get_groups_id() as $cur_gid){
53
    if (in_array($cur_gid, $old_admin_groups)) {
54
        $in_old_group = TRUE;
55
    }
56
}
57
if((!$in_old_group) AND !is_numeric(array_search($admin->get_user_id(), $old_admin_users))) {
52 58
	$admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
53 59
}
54 60

  

Also available in: Unified diff