[CLEANUP] Unqoute integer in BackendUserSessionRepository 99/32899/2
authorAndreas Fernandez <andreas.fernandez@aspedia.de>
Fri, 19 Sep 2014 13:46:22 +0000 (15:46 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Sat, 20 Sep 2014 21:03:55 +0000 (23:03 +0200)
In the method "findByBackendUser" in BackendUserSessionRepository,
the beuser uid used in the WHERE condition is casted to int and is
then quoted again.
This is not necessary and breaks the SQL for some DBMS.

Resolves: #61743
Releases: master, 6.2
Change-Id: Ibff2b6189efa16b8d7ce0acbc1637ce374f5f24d
Reviewed-on: http://review.typo3.org/32899
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/beuser/Classes/Domain/Repository/BackendUserSessionRepository.php

index 4719c17..03cb8e0 100644 (file)
@@ -34,7 +34,7 @@ class BackendUserSessionRepository extends \TYPO3\CMS\Extbase\Persistence\Reposi
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
                        'ses_id AS id, ses_iplock AS ip, ses_tstamp AS timestamp',
                        'be_sessions',
-                       'ses_userid = "' . (int)$backendUser->getUid() . '"',
+                       'ses_userid = ' . (int)$backendUser->getUid(),
                        '',
                        'ses_tstamp ASC'
                );