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:

restore.php
55 55
$results_array = $results->fetchRow();
56 56
$old_admin_groups = explode(',', str_replace('_', '', $results_array['admin_groups']));
57 57
$old_admin_users = explode(',', str_replace('_', '', $results_array['admin_users']));
58
if(!is_numeric(array_search($admin->get_group_id(), $old_admin_groups)) AND !is_numeric(array_search($admin->get_user_id(), $old_admin_users))) {
58

  
59
$in_old_group = FALSE;
60
foreach($admin->get_groups_id() as $cur_gid){
61
    if (in_array($cur_gid, $old_admin_groups)) {
62
	$in_old_group = TRUE;
63
    }
64
}
65
if((!$in_old_group) AND !is_numeric(array_search($admin->get_user_id(), $old_admin_users))) {
59 66
	$admin->print_error($MESSAGE['PAGES']['INSUFFICIENT_PERMISSIONS']);
60 67
}
61 68

  

Also available in: Unified diff