diff --git a/.project/tests/typoscript-lint.yml b/.project/tests/typoscript-lint.yml
index 4189cb80..effe08ea 100644
--- a/.project/tests/typoscript-lint.yml
+++ b/.project/tests/typoscript-lint.yml
@@ -3,6 +3,8 @@ paths:
filePatterns:
- "*.tsconfig"
- "*.typoscript"
+excludePatterns:
+ - "LuxLetter.typoscript"
sniffs:
- class: Indentation
parameters:
diff --git a/Classes/Command/ExtbaseCommandTrait.php b/Classes/Command/ExtbaseCommandTrait.php
index ef1973dc..81a20002 100644
--- a/Classes/Command/ExtbaseCommandTrait.php
+++ b/Classes/Command/ExtbaseCommandTrait.php
@@ -13,7 +13,7 @@
trait ExtbaseCommandTrait
{
- public function initializeExtbase()
+ public function initializeExtbase(): void
{
if (EnvironmentUtility::isCli() && ConfigurationUtility::isTypo3Version12() === false) {
Bootstrap::initializeBackendAuthentication();
diff --git a/Classes/Domain/Tracker/FrontenduserAuthenticationTracker.php b/Classes/Domain/Tracker/FrontenduserAuthenticationTracker.php
index 748c0be5..9c91e900 100644
--- a/Classes/Domain/Tracker/FrontenduserAuthenticationTracker.php
+++ b/Classes/Domain/Tracker/FrontenduserAuthenticationTracker.php
@@ -28,7 +28,7 @@ public function trackByFrontenduserAuthentication(): void
if (FrontendUtility::isLoggedInFrontendUser()) {
$userRepository = GeneralUtility::makeInstance(FrontendUserRepository::class);
/** @var FrontendUser $user */
- $user = $userRepository->findByUid((int)FrontendUtility::getPropertyFromLoggedInFrontendUser('uid'));
+ $user = $userRepository->findByUid((int)FrontendUtility::getPropertyFromLoggedInFrontendUser());
$this->setRelationToFrontendUser($user);
$this->addEmailAttribute($user);
diff --git a/Classes/Utility/ConfigurationUtility.php b/Classes/Utility/ConfigurationUtility.php
index 0470d07b..2761ecea 100644
--- a/Classes/Utility/ConfigurationUtility.php
+++ b/Classes/Utility/ConfigurationUtility.php
@@ -6,9 +6,9 @@
use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationExtensionNotConfiguredException;
use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationPathDoesNotExistException;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
+use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\VersionNumberUtility;
class ConfigurationUtility
{
@@ -240,32 +240,8 @@ protected static function getExtensionConfiguration(): array
return GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('lux');
}
- /**
- * Todo: Can be removed if TYPO3 12 support is dropped
- *
- * @return bool
- */
public static function isTypo3Version12(): bool
{
- return self::isVersionToCompareSameOrHigherThenCurrentTypo3Version('12.4.99');
- }
-
- /**
- * @param string $versionToCompare like "1.2.3"
- * @return bool
- */
- public static function isVersionToCompareSameOrHigherThenCurrentTypo3Version(string $versionToCompare): bool
- {
- return VersionNumberUtility::convertVersionNumberToInteger($versionToCompare) >= self::getCurrentTypo3Version();
- }
-
- /**
- * Return current TYPO3 version as integer - e.g. 10003000 (10.3.0) or 9005014 (9.5.14)
- *
- * @return int
- */
- protected static function getCurrentTypo3Version(): int
- {
- return VersionNumberUtility::convertVersionNumberToInteger(VersionNumberUtility::getNumericTypo3Version());
+ return (new Typo3Version())->getMajorVersion() === 12;
}
}
diff --git a/Classes/Utility/FrontendUtility.php b/Classes/Utility/FrontendUtility.php
index 2094a3e6..e313b0ea 100644
--- a/Classes/Utility/FrontendUtility.php
+++ b/Classes/Utility/FrontendUtility.php
@@ -5,6 +5,7 @@
use In2code\Lux\Domain\Service\SiteService;
use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication;
use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
class FrontendUtility
@@ -43,18 +44,27 @@ public static function getCurrentHostAndDomain(): string
public static function isLoggedInFrontendUser(): bool
{
- return !empty(self::getTyposcriptFrontendController()->fe_user->user['uid']);
+ $authentication = self::getFrontendUserAuthentication();
+ if ($authentication !== null) {
+ return $authentication->user['uid'] > 0;
+ }
+ return false;
}
public static function getPropertyFromLoggedInFrontendUser($propertyName = 'uid'): string
{
- $tsfe = self::getTyposcriptFrontendController();
- if (!empty($tsfe->fe_user->user[$propertyName])) {
- return (string)$tsfe->fe_user->user[$propertyName];
+ $authentication = self::getFrontendUserAuthentication();
+ if ($authentication !== null) {
+ return (string)($authentication->user[$propertyName] ?? '');
}
return '';
}
+ protected static function getFrontendUserAuthentication(): ?FrontendUserAuthentication
+ {
+ return $GLOBALS['TYPO3_REQUEST']?->getAttribute('frontend.user');
+ }
+
/**
* @return ?TypoScriptFrontendController
* @SuppressWarnings(PHPMD.Superglobals)
diff --git a/Configuration/TSConfig/LuxLetter.typoscript b/Configuration/TSConfig/LuxLetter.typoscript
new file mode 100644
index 00000000..cce27cc0
--- /dev/null
+++ b/Configuration/TSConfig/LuxLetter.typoscript
@@ -0,0 +1,2 @@
+# Overrule LUXletter backend module view for receiver list
+templates.in2code/luxletter.1732878717 = in2code/lux:/Resources/Private/
diff --git a/Documentation/Technical/Changelog/Index.md b/Documentation/Technical/Changelog/Index.md
index 40b12461..feee6440 100644
--- a/Documentation/Technical/Changelog/Index.md
+++ b/Documentation/Technical/Changelog/Index.md
@@ -9,6 +9,7 @@
| Version | Date | State | TYPO3 | Description |
|------------|------------|----------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| 38.1.0 | 2024-12-08 | Task | `12.4 + 13.4` | Fix identification of logged in frontendusers, update some LUXletter related stuff (if LUX + LUXletter is in use), code cleanup |
| 38.0.1 | 2024-11-26 | Bugfix | `12.4 + 13.4` | Update TYPO3 dependencies in old ext_emconf file |
| 38.0.0 | 2024-11-25 | Feature | `12.4 + 13.4` | Add TYPO3 13 support, drop TYPO3 11 support, add darkmode styling, add LUX to TYPO3 livesearch in backend |
| 37.1.0 | 2024-10-30 | Task | `11.5 + 12.4` | Bing is used for preview images instead of google (if feature is turned on for leads and companies) |
diff --git a/Resources/Private/Templates/Newsletter/Receiver.html b/Resources/Private/Templates/Newsletter/Receiver.html
index f8a1a8e8..3b3859f0 100644
--- a/Resources/Private/Templates/Newsletter/Receiver.html
+++ b/Resources/Private/Templates/Newsletter/Receiver.html
@@ -1,4 +1,4 @@
-