diff --git a/src/modules/Servicehosting/Service.php b/src/modules/Servicehosting/Service.php index 1f56ed51c..188ecfdb0 100644 --- a/src/modules/Servicehosting/Service.php +++ b/src/modules/Servicehosting/Service.php @@ -379,9 +379,17 @@ class Service implements InjectionAwareInterface return null; } - private function _performOnService(\Model_ClientOrder $order) + private function _performOnService(\Model_ClientOrder $order): bool { - return $order->status != \Model_ClientOrder::STATUS_FAILED_SETUP; + // If the order matches any of the following status, we should prevent actions such as PW resets or username changes from being performed + $badStatus = [ + \Model_ClientOrder::STATUS_FAILED_SETUP, + \Model_ClientOrder::STATUS_PENDING_SETUP, + \Model_ClientOrder::STATUS_SUSPENDED, + \Model_ClientOrder::STATUS_CANCELED, + ]; + + return !in_array($order->status, $badStatus); } private function _getServerMangerForOrder($model)