[BUGFIX] Correct SQL query for BE user filemounts 96/47796/3
authorBenni Mack <benni@typo3.org>
Tue, 19 Apr 2016 16:37:30 +0000 (18:37 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 19 Apr 2016 20:56:01 +0000 (22:56 +0200)
Due to a wrong SQL statement, it is not possible
to evaluate any filemounts anymore for be users / groups.

The patch sets a correct SQL statement.

Resolves: #75792
Releases: master
Change-Id: I0f293a4ffc914e95608509e45257a00c938f291a
Reviewed-on: https://review.typo3.org/47796
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php

index 1f2c457..a93371f 100644 (file)
@@ -1584,10 +1584,9 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
             $queryBuilder = $connectionPool->getQueryBuilderForTable('sys_filemounts');
             $queryBuilder->select('*')
                 ->from('sys_filemounts')
-                ->where($queryBuilder->expr()->eq('deleted', 0))
-                ->andWhere($queryBuilder->expr()->eq('hidden', 0))
+                ->where($queryBuilder->expr()->eq('hidden', 0))
                 ->andWhere($queryBuilder->expr()->eq('pid', 0))
-                ->andWhere($queryBuilder->expr()->in('uid', $queryBuilder->createNamedParameter($fileMounts)));
+                ->andWhere($queryBuilder->expr()->in('uid', $fileMounts));
 
             foreach (QueryHelper::parseOrderBy($orderBy) as $fieldAndDirection) {
                 $queryBuilder->addOrderBy(...$fieldAndDirection);