function run()
 {
     try {
         $batch_size = 1000;
         if (isset($_GET['batch_size'])) {
             $batch_size = intval(trim(Convert::raw2sql($_GET['batch_size'])));
         }
         $manager = new RevocationNotificationManager(new SapphireFoundationMemberRepository(), new SapphireFoundationMemberRevocationNotificationRepository(), new SapphireElectionRepository(), new RevocationNotificationFactory(), SapphireTransactionManager::getInstance());
         $manager->revokeIgnoredNotifications($batch_size);
         return 'OK';
     } catch (Exception $ex) {
         SS_Log::log($ex, SS_Log::ERR);
         echo $ex->getMessage();
     }
 }
 public function deleteFoundationMembership()
 {
     $token = $this->request->param('ACTION_TOKEN');
     try {
         $current_member = Member::currentUser();
         if (is_null($current_member)) {
             return Controller::curr()->redirect("Security/login?BackURL=" . urlencode($_SERVER['REQUEST_URI']));
         }
         $notification = $this->notification_repository->getByHash($token);
         if (!$notification) {
             return $this->renderWith(array('RevocationNotificationActionPage_error', 'Page'));
         }
         if ($notification->recipient()->getIdentifier() != $current_member->ID) {
             return $this->renderWith(array('RevocationNotificationActionPage_belongs_2_another_user', 'Page'), array('UserName' => $notification->recipient()->Email));
         }
         if ($notification->isExpired()) {
             return $this->renderWith(array('RevocationNotificationActionPage_expired', 'Page'), array('RevocationDate' => $notification->actionDate()->format('F j'), 'UserName' => $notification->recipient()->Email));
         }
         if (!$notification->isValid()) {
             return $this->renderWith(array('RevocationNotificationActionPage_error', 'Page'));
         }
         $this->notification_manager->deleteAccount($notification);
         return $this->renderWith(array('RevocationNotificationActionPage_delete', 'Page'));
     } catch (Exception $ex) {
         SS_Log::log($ex, SS_Log::ERR);
         return $this->renderWith(array('RevocationNotificationActionPage_error', 'Page'));
     }
 }