Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 331ddb77 authored by Ronak Patel's avatar Ronak Patel
Browse files

removed change status

parent 86e66b26
Loading
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -20,8 +20,6 @@ class BeforeUserDeletedListener implements IEventListener {
	private $LDAPConnectionService;
	private $shopAccountService;
	private $userService;
	private const PENDING_CANCEL_STATUS = 'pending-cancel';
	private const CANCELLED_STATUS = 'cancelled';

	public function __construct(ILogger $logger, IConfig $config, LDAPConnectionService $LDAPConnectionService, UserService $userService, ShopAccountService $shopAccountService) {
		$this->logger = $logger;
@@ -66,10 +64,6 @@ class BeforeUserDeletedListener implements IEventListener {

		if ($shopUser && $this->shopAccountService->isUserOIDC($shopUser)) {
			if ($deleteShopAccount) {
				$subscriptions = $this->shopAccountService->getSubscriptions($shopUser['id'], self::PENDING_CANCEL_STATUS);
				foreach ($subscriptions as $subscription) {
					$this->shopAccountService->updateSubscriptionStatus($subscription['id'], self::CANCELLED_STATUS);
				}
				$this->shopAccountService->deleteUser($shopUser['id']);
			} else {
				$newEmail = $this->shopAccountService->getShopEmailPostDeletePreference($uid);