Browse Source

and solved for xml too

Juan Carlos Raña 15 years ago
parent
commit
d7693cd7df
1 changed files with 7 additions and 0 deletions
  1. 7 0
      main/admin/user_import.php

+ 7 - 0
main/admin/user_import.php

@@ -322,11 +322,18 @@ if ($_POST['formSent'] AND $_FILES['import_file']['size'] !== 0) {
 	if (strcmp($file_type, 'csv') === 0) // this replace if (strcmp($_FILES['import_file']['type'], 'text/'.$file_type.'') === 0)
 	{
 		save_data($users_to_insert);
+		
+	} elseif (strcmp($file_type, 'xml') === 0) {
+		
+		save_data($users_to_insert);
+		
 	} else {
+		
 		$error_message = get_lang('YouMustImportAFileAccordingToSelectedOption');
 		header('Location: '.api_get_self().'?warn='.urlencode($error_message).'&file_type='.$file_type.'&sec_token='.$tok);
 		exit ();
 	}
+	
 
 	if (count($errors) > 0) {
 		$see_message_import = get_lang('FileImportedJustUsersThatAreNotRegistered');