Commit 558e5d30 authored by Thomas Löffler's avatar Thomas Löffler
Browse files

[TASK] CGL fix

parent 2ee963c8
<?php
declare(strict_types=1);
namespace SpoonerWeb\BeSecurePw\Controller;
......@@ -23,10 +24,8 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*
* The TYPO3 project - inspiring people to share!
*/
class ForcePasswordChangeController
{
public function forceAction(ServerRequestInterface $request)
{
$dataHandler = GeneralUtility::makeInstance(DataHandler::class);
......
<?php
declare(strict_types=1);
namespace SpoonerWeb\BeSecurePw\Database\Event;
......@@ -22,10 +23,8 @@ use TYPO3\CMS\Recordlist\Event\ModifyRecordListRecordActionsEvent;
*
* The TYPO3 project - inspiring people to share!
*/
class AddForceResetPasswordLinkEvent
{
public static string $passwordChangeCommand = 'force_password_change';
public function __invoke(ModifyRecordListRecordActionsEvent $event): void
......@@ -35,7 +34,7 @@ class AddForceResetPasswordLinkEvent
$url = (string)$uriBuilder->buildUriFromRoutePath(
'/user/force_password_change',
[
self::$passwordChangeCommand => $event->getRecord()['uid']
self::$passwordChangeCommand => $event->getRecord()['uid'],
]
);
......
<?php
declare(strict_types=1);
namespace SpoonerWeb\BeSecurePw\Form\Element;
......@@ -20,10 +21,8 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*
* The TYPO3 project - inspiring people to share!
*/
class ForcePasswordChangeButton extends AbstractFormElement
{
public function render()
{
$fieldInformationResult = $this->renderFieldInformation();
......@@ -39,7 +38,7 @@ class ForcePasswordChangeButton extends AbstractFormElement
$uri = (string)$uriBuilder->buildUriFromRoutePath(
'/user/force_password_change',
[
AddForceResetPasswordLinkEvent::$passwordChangeCommand => $this->data['databaseRow']['uid']
AddForceResetPasswordLinkEvent::$passwordChangeCommand => $this->data['databaseRow']['uid'],
]
);
......
......@@ -39,7 +39,7 @@ $boot = function () {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1642630971] = [
'nodeName' => 'forcePasswordChangeButton',
'priority' => 40,
'class' => \SpoonerWeb\BeSecurePw\Form\Element\ForcePasswordChangeButton::class
'class' => \SpoonerWeb\BeSecurePw\Form\Element\ForcePasswordChangeButton::class,
];
};
......
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