diff --git a/main/admin/user_list.php b/main/admin/user_list.php index 81f0109a55..1200db0f49 100644 --- a/main/admin/user_list.php +++ b/main/admin/user_list.php @@ -688,16 +688,7 @@ if (!empty($action)) { } } break; - } - Security::clear_token(); - } -} - -if (isset ($_POST['action'])) { - $check = Security::check_token('get'); - if ($check) { - switch ($_POST['action']) { - case 'delete' : + case 'delete' : if (api_is_platform_admin()) { $number_of_selected_users = count($_POST['id']); $number_of_deleted_users = 0; @@ -710,10 +701,10 @@ if (isset ($_POST['action'])) { } } } - if($number_of_selected_users == $number_of_deleted_users) { - Display :: display_confirmation_message(get_lang('SelectedUsersDeleted')); + if ($number_of_selected_users == $number_of_deleted_users) { + $message = Display :: return_message(get_lang('SelectedUsersDeleted'), 'confirmation'); } else { - Display :: display_error_message(get_lang('SomeUsersNotDeleted')); + $message = Display :: return_message(get_lang('SomeUsersNotDeleted'), 'error'); } } break; @@ -723,7 +714,7 @@ if (isset ($_POST['action'])) { } // Create a search-box -$form = new FormValidator('search_simple','get','','',array('class' => 'form-search'),false); +$form = new FormValidator('search_simple','get', '', '',array('class' => 'form-search'),false); $renderer =& $form->defaultRenderer(); $renderer->setElementTemplate('{element} '); $form->addElement('text','keyword',get_lang('keyword'), 'size="25"'); @@ -738,7 +729,6 @@ if (api_is_platform_admin()) { } $actions .=$form->return_form(); - if (isset ($_GET['keyword'])) { $parameters = array ('keyword' => Security::remove_XSS($_GET['keyword'])); } elseif (isset ($_GET['keyword_firstname'])) {