diff --git a/main/admin/user_import.php b/main/admin/user_import.php index 01e9218b49..0ee50ef17f 100644 --- a/main/admin/user_import.php +++ b/main/admin/user_import.php @@ -335,6 +335,11 @@ if ($_POST['formSent'] AND $_FILES['import_file']['size'] !== 0) { $error_message .= ''; } + // if the warning message is too long then we display the warning message trough a session + if (strlen($error_message) > 150){ + $_SESSION['session_message_import_users'] = $error_message; + $error_message = 'session_message'; + } Security::clear_token(); $tok = Security::get_token(); @@ -418,11 +423,6 @@ if ($count_fields > 0) { diff --git a/main/admin/user_list.php b/main/admin/user_list.php index 2b76c66200..1bf0ee0ba1 100644 --- a/main/admin/user_list.php +++ b/main/admin/user_list.php @@ -624,6 +624,10 @@ else switch ($_GET['action']) { case 'show_message' : if (!empty($_GET['warn'])) { + // to prevent too long messages + if ($_GET['warn'] == 'session_message'){ + $_GET['warn'] = $_SESSION['session_message_import_users']; + } Display::display_warning_message(urldecode($_GET['warn']),false); } if (!empty($_GET['message'])) {