diff --git a/lib/Listeners/BeforeUserDeletedListener.php b/lib/Listeners/BeforeUserDeletedListener.php index 7126c62438f186dfb4433b700eebf51d874a1ba1..e383b52fbb4d4a3de85d42efd9a70340b517c795 100644 --- a/lib/Listeners/BeforeUserDeletedListener.php +++ b/lib/Listeners/BeforeUserDeletedListener.php @@ -74,7 +74,7 @@ class BeforeUserDeletedListener implements IEventListener } else { $newEmail = $this->shopAccountService->getShopEmailPostDeletePreference($uid); - $newEmail = $this->shopAccountService->updateUserEmail($shopUser['id'], $newEmail); + $newEmail = $this->shopAccountService->updateUserEmailAndEmptyOIDC($shopUser['id'], $newEmail); } } } diff --git a/lib/Service/ShopAccountService.php b/lib/Service/ShopAccountService.php index 7e35670e6436b61b3da093c54f28571a7696686b..c3145c65d0bbe22980281507978afe4e554de657 100644 --- a/lib/Service/ShopAccountService.php +++ b/lib/Service/ShopAccountService.php @@ -125,11 +125,12 @@ class ShopAccountService { } - public function updateUserEmail(int $userId, string $email) : void { + public function updateUserEmailAndEmptyOIDC(int $userId, string $email) : void { $updateUrl = $this->shopUserUrl . '/' . strval($userId); $params = [ - 'email' => $email + 'email' => $email, + 'openid-connect-generic-last-user-claim' => [] ]; try {