/**
  * Remove uncompleted registrations and update waiting list
  */
 public function removeUncompletedRegistrationsCommand()
 {
     $registrations = $this->registrationRepository->findUncompletedRegistrationsToRemove();
     /** @var Registration $registration */
     foreach ($registrations as $registration) {
         $this->registrationRepository->remove($registration);
     }
     $this->persistenceManager->persistAll();
     $this->updateWaitingListCommand();
 }
 /**
  * @param \T3DD\Backend\Domain\Model\Registration\Registration $registration
  */
 public function deleteAction(\T3DD\Backend\Domain\Model\Registration\Registration $registration)
 {
     if (!$this->securityContext->hasRole('T3DD.Backend:Administrator') && (!$registration->getSecondsToExpiration() || $registration->getAccount() !== $this->securityContext->getAccount())) {
         $this->response->setStatus(403);
         return;
     }
     $this->registrationRepository->remove($registration);
     $this->view->assign('value', NULL);
 }