diff --git a/extension/qfq/qfq/store/Session.php b/extension/qfq/qfq/store/Session.php index 594fcf069178e6b9d90a7f9cf8cece63faecc671..3b99dac488c279679b55ee2989005a5f31ae04ef 100644 --- a/extension/qfq/qfq/store/Session.php +++ b/extension/qfq/qfq/store/Session.php @@ -146,7 +146,7 @@ class Session { * Check if the recent logged in feUserUid is equal to the one stored in session: If different, invalidate (clear) * the session and save the new feUser, feUserUid in the session. If isset($GLOBALS["TSFE"]), than we're in a T3 * environment, else we are called as API classes and need to fake feUser / feUserUid from previous stored session. - * It's neccessary to have feUser / feUserUid available in API classes, due to dynamic update which might reload + * It's necessary to have feUser / feUserUid available in API classes, due to dynamic update which might reload * data based on feUser / feUserUid. */ private static function checkFeUserUid() { diff --git a/extension/qfq/qfq/store/Store.php b/extension/qfq/qfq/store/Store.php index b5f67ae6acb343249eeaa960ae9a2c6a4838a83e..255c2e83607acfbab0da356ead6a033421cc9e8a 100644 --- a/extension/qfq/qfq/store/Store.php +++ b/extension/qfq/qfq/store/Store.php @@ -12,6 +12,7 @@ use qfq; require_once(__DIR__ . '/../../qfq/helper/KeyValueStringParser.php'); require_once(__DIR__ . '/../../qfq/helper/Sanitize.php'); +require_once(__DIR__ . '/../../qfq/helper/Logger.php'); require_once(__DIR__ . '/../../qfq/Constants.php'); require_once(__DIR__ . '/../../qfq/store/Sip.php'); require_once(__DIR__ . '/../../qfq/store/T3Info.php'); @@ -428,9 +429,9 @@ class Store { * @param $key * @param $store */ - public static function unsetVar($key, $store){ + public static function unsetVar($key, $store) { - if(isset(self::$raw[$store][$key])) { + if (isset(self::$raw[$store][$key])) { unset(self::$raw[$store][$key]); } } @@ -518,7 +519,7 @@ class Store { /** * Fills the STORE_EXTRA. * - * @param string $storeName STORE_EXTRA, STORE_USER + * @param string $storeName STORE_EXTRA, STORE_USER * @throws CodeException * @throws UserFormException */ @@ -652,6 +653,13 @@ class Store { $data = array(); } + // Switch FeUser: log this to qfq.log + if ($storeName === STORE_USER && $key == TYPO3_FE_USER) { + $qfqLog = self::getVar(SYSTEM_QFQ_LOG, STORE_SYSTEM); + $feUserOld = isset($data[$key]) ? $data[$key] : self::getVar($key, STORE_TYPO3 . STORE_EMPTY); + Logger::logMessage(date('Y.m.d H:i:s ') . ": Switch feUser '$feUserOld' to '$value'", $qfqLog); + } + $data[$key] = $value; Session::set($storeName, $data); }