Skip to content
Code-Schnipsel Gruppen Projekte
Commit 47e060cf erstellt von Patrick Müller's avatar Patrick Müller
Dateien durchsuchen

Merge branch 'dev'

Übergeordnete a7e63747 440813ef
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
...@@ -246,17 +246,22 @@ public static function onQuiqqerOrderSuccessful($Order) ...@@ -246,17 +246,22 @@ public static function onQuiqqerOrderSuccessful($Order)
$User = $Users->get($Order->getCustomer()->getId()); $User = $Users->get($Order->getCustomer()->getId());
} catch (\Exception $Exception) { } catch (\Exception $Exception) {
QUI\System\Log::writeDebugException($Exception); QUI\System\Log::writeDebugException($Exception);
QUI\System\Log::addError(
self::class.' :: onQuiqqerOrderSuccessful -> Could not load user #'.$Order->getCustomer()->getId()
.' from Order #'.$Order->getPrefixedId().'. Cannot add user to membership'
);
return; return;
} }
// do not add guests to a membership! // do not add guests to a membership!
$SessionUser = QUI::getUserBySession(); // $SessionUser = QUI::getUserBySession();
//
if (!$SessionUser->isSU() // if (!$SessionUser->isSU()
&& !$Users->isSystemUser($SessionUser) // && !$Users->isSystemUser($SessionUser)
&& !$Users->isAuth($User)) { // && !$Users->isAuth($User)) {
return; // return;
} // }
$SystemUser = QUI::getUsers()->getSystemUser(); $SystemUser = QUI::getUsers()->getSystemUser();
...@@ -285,6 +290,7 @@ public static function onQuiqqerOrderSuccessful($Order) ...@@ -285,6 +290,7 @@ public static function onQuiqqerOrderSuccessful($Order)
$MembershipUser->update(); $MembershipUser->update();
} catch (\QUI\ERP\Products\Product\Exception $Exception) { } catch (\QUI\ERP\Products\Product\Exception $Exception) {
// nothing, this can happen if the $Product does not have a membership field assigned // nothing, this can happen if the $Product does not have a membership field assigned
QUI\System\Log::writeDebugException($Exception);
} catch (\Exception $Exception) { } catch (\Exception $Exception) {
QUI\System\Log::writeException($Exception); QUI\System\Log::writeException($Exception);
} }
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren