Minor code style fix - refs BT#17154

pull/3275/head
Sébastien Ducoulombier 6 years ago
parent 891155c3d5
commit bc52cedebf
  1. 5
      main/admin/user_anonymize_import.php

@ -43,7 +43,7 @@ if ($step1Form->validate() && $usernameListFile->isUploadedFile()) {
if (!file_exists($filePath)) {
throw new Exception(get_lang('CouldNotReadFile').' '.$filePath);
}
$submittedUsernames = file($filePath, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
$submittedUsernames = file($filePath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
if (false === $submittedUsernames) {
throw new Exception(get_lang('CouldNotReadFileLines').' '.$filePath);
}
@ -95,6 +95,9 @@ if ($step1Form->validate() && $usernameListFile->isUploadedFile()) {
}
} elseif ($step2Form->validate()) {
$usernames = preg_split("/\s+/", $usernameTextarea->getValue());
if (false === $usernames) {
throw new Exception('preg_split failed');
}
printf("<p>Loading %d users...</p>\n", count($usernames));
$users = UserManager::getRepository()->matching(
Criteria::create()->where(

Loading…
Cancel
Save