Skip to content

Commit 72ffab9

Browse files
committed
address review
Signed-off-by: szaimen <szaimen@e.mail.de>
1 parent e8122f2 commit 72ffab9

File tree

1 file changed

+2
-8
lines changed
  • apps/updatenotification/lib/Settings

1 file changed

+2
-8
lines changed

apps/updatenotification/lib/Settings/Admin.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -213,22 +213,16 @@ private function getUserCount(): int {
213213
$backendUsers = $backend->countUsers();
214214
if ($backendUsers !== false) {
215215
$userCount += $backendUsers;
216-
} else {
217-
// TODO what if the user count can't be determined?
218-
$this->logger->warning('Can not determine user count for ' . get_class($backend), ['app' => 'updatenotification']);
219216
}
220217
}
221218
}
222219

223-
$disabledUsers = $this->config->getUsersForUserValue('core', 'enabled', 'false');
224-
$disabledUsersCount = count($disabledUsers);
225-
$userCount = $userCount - $disabledUsersCount;
226-
220+
// Disabled users are not subtracted because they lengthen the overall update size, too
227221
if ($userCount < 0) {
228222
$userCount = 0;
229223

230224
// this should never happen
231-
$this->logger->warning("Total user count was negative (users: $userCount, disabled: $disabledUsersCount)", ['app' => 'updatenotification']);
225+
$this->logger->warning("Total user count was negative (users: $userCount)", ['app' => 'updatenotification']);
232226
}
233227

234228
return $userCount;

0 commit comments

Comments
 (0)