Skip to content
Code-Schnipsel Gruppen Projekte
Commit 4e8732ae erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix: usage of user interface in eventhandler

- Updated PHPStan version from 1.11.8 to 1.12.13 in phars.xml
- Changed User class interfaces in the event handlers from QUI\Users\User to
QUI\Interfaces\Users\User
- Also, added additional checks and updated function parameters for type consistency.
Übergeordneter b0e75b59
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
2 Merge Requests!60Update 'next-3.x' with latest changes from 'main',!59fix: usage of user interface in eventhandler
Pipeline-Nr. 16454 bestanden
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpstan" version="1.11.8" installed="1.11.8" location="./tools/phpstan" copy="false"/>
<phar name="phpstan" version="1.*" installed="1.12.13" location="./tools/phpstan" copy="false"/>
<phar name="phpunit" version="^10.5.20" installed="10.5.20" location="./tools/phpunit" copy="false"/>
<phar name="phpcs" version="^3.10.1" installed="3.10.1" location="./tools/phpcs" copy="false"/>
<phar name="phpcbf" version="^3.10.1" installed="3.10.1" location="./tools/phpcbf" copy="false"/>
......
......@@ -196,7 +196,7 @@ protected static function readAttributesFromUserXML(string $file): array
return $attributes;
}
public static function onUserSaveBegin(QUI\Users\User $User): void
public static function onUserSaveBegin(QUI\Interfaces\Users\User $User): void
{
if (!QUI::getUsers()->isUser($User)) {
return;
......@@ -234,10 +234,14 @@ public static function onUserSaveBegin(QUI\Users\User $User): void
}
/**
* @param QUI\Users\User $User
* @param QUI\Interfaces\Users\User $User
*/
public static function onUserSaveEnd(QUI\Users\User $User): void
public static function onUserSaveEnd(QUI\Interfaces\Users\User $User): void
{
if (!QUI::getUsers()->isUser($User)) {
return;
}
$attributes = $User->getAttributes();
$data = [];
......@@ -297,15 +301,15 @@ public static function onUserSaveEnd(QUI\Users\User $User): void
}
/**
* @param QUI\Users\User $User
* @param QUI\Interfaces\Users\User $User
* @param bool|string $code
* @param null|QUI\Interfaces\Users\User $PermissionUser
*
* @throws QUI\Users\Exception|QUI\Exception
*/
public static function onUserActivateBegin(
QUI\Users\User $User,
bool|string $code,
QUI\Interfaces\Users\User $User,
bool | string $code,
?QUI\Interfaces\Users\User $PermissionUser
): void {
$Group = Utils::getInstance()->getCustomerGroup();
......@@ -342,6 +346,7 @@ public static function onUserActivateBegin(
* - set the user to the customer group
*
* @param QUI\ERP\Order\Controls\OrderProcess\CustomerData $Step
* @throws QUI\Exception
*/
public static function onQuiqqerOrderCustomerDataSaveEnd(
QUI\ERP\Order\Controls\OrderProcess\CustomerData $Step
......@@ -378,15 +383,15 @@ public static function onQuiqqerOrderCustomerDataSaveEnd(
* Handle the frontend user data event
*
* @param Collector $Collector - The collector object
* @param QUI\Users\User $User - The user object
* @param QUI\Interfaces\Users\User $User - The user object
* @param mixed $Address - The address data
* @return void
* @throws Exception
*/
public static function onFrontendUserDataMiddle(
Collector $Collector,
QUI\Users\User $User,
$Address
QUI\Interfaces\Users\User $User,
mixed $Address
): void {
$Engine = QUI::getTemplateManager()->getEngine();
$canEdit = QUI\Permissions\Permission::hasPermission('quiqqer.customer.FrontendUsers.contactPerson.edit');
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren