objects)) { $this->readObjects(); if (empty($this->objects)) { throw new UserInputException('objectIDs'); } } unset($this->parameters['revoker']); WCF::getSession()->checkPermissions([ 'admin.chat.canManageSuspensions', ]); foreach ($this->getObjects() as $object) { if (!$object->isActive()) { throw new UserInputException('objectIDs', 'nonActive'); } } } /** * Revokes the suspensions */ public function revoke() { if (empty($this->objects)) { $this->readObjects(); } // User cannot be set during an AJAX request, but may be set by Tim’s Chat itself. if (!isset($this->parameters['revoker'])) { $this->parameters['revoker'] = WCF::getUser(); } $data = [ 'revoked' => TIME_NOW, 'revokerID' => $this->parameters['revoker']->userID, 'revoker' => $this->parameters['revoker']->username, ]; $objectAction = new static( $this->getObjects(), 'update', [ 'data' => $data, ] ); $objectAction->executeAction(); } }