Allow bulk processing in worker for some user actions
authorCyperghost <olaf_schmitz_1@t-online.de>
Tue, 23 Jan 2024 13:37:23 +0000 (14:37 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Tue, 23 Jan 2024 13:37:23 +0000 (14:37 +0100)
wcfsetup/install/files/lib/system/bulk/processing/TReasonedBulkProcessingAction.class.php
wcfsetup/install/files/lib/system/bulk/processing/user/DeleteUserBulkProcessingAction.class.php

index 0f3c804e467f2b6770bedc9f5b3092944eca661b..99ff89ff7e3d47915a8e08787ab589ac4bccd6f1 100644 (file)
@@ -56,4 +56,18 @@ trait TReasonedBulkProcessingAction
     {
         $this->reason = '';
     }
+
+    #[\Override]
+    public function getAdditionalParameters(): array
+    {
+        return [
+            'reason' => $this->reason,
+        ];
+    }
+
+    #[\Override]
+    public function loadAdditionalParameters(array $data): void
+    {
+        $this->reason = $data['reason'] ?? '';
+    }
 }
index d4385c8f2f6e9c8c77eb0b6ae9718fc7381c405a..9f023e996165aa3e281360628e3cff5e78a9b7fe 100644 (file)
@@ -47,4 +47,10 @@ class DeleteUserBulkProcessingAction extends AbstractUserBulkProcessingAction
 
         return $userList;
     }
+
+    #[\Override]
+    public function canRunInWorker(): bool
+    {
+        return true;
+    }
 }