Commit bb94e866 authored by Christian Kuhn's avatar Christian Kuhn Committed by Benni Mack
Browse files

[BUGFIX] Never show deleted users in compare view

Adding a user to the ext:beuser 'compare' list and
deleting the user afterwards, still allows to compare
that user with others.
Fix the repository query settings to never handle
deleted users.

Resolves: #93235
Releases: master, 10.4
Change-Id: I18d3eacfd6b0d19f7dca6f57d51dbc33aa2c8273
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67354

Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 984a9a85
......@@ -56,8 +56,6 @@ class BackendUserRepository extends BackendUserGroupRepository
{
$constraints = [];
$query = $this->createQuery();
// Find invisible as well, but not deleted
$constraints[] = $query->equals('deleted', 0);
$query->setOrderings(['userName' => QueryInterface::ORDER_ASCENDING]);
// Username
if ($demand->getUserName() !== '') {
......@@ -108,7 +106,9 @@ class BackendUserRepository extends BackendUserGroupRepository
$query->like('usergroup', '%,' . (int)$demand->getBackendUserGroup() . ',%')
]);
}
$query->matching($query->logicalAnd($constraints));
if ($constraints !== []) {
$query->matching($query->logicalAnd($constraints));
}
/** @var QueryResult $result */
$result = $query->execute();
return $result;
......@@ -144,7 +144,6 @@ class BackendUserRepository extends BackendUserGroupRepository
{
$query = parent::createQuery();
$query->getQuerySettings()->setIgnoreEnableFields(true);
$query->getQuerySettings()->setIncludeDeleted(true);
return $query;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment