]> git.mxchange.org Git - shipsimu.git/blobdiff - application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysTrainingFilter.php
First password than CAPTCHA is now being asked, training form extended
[shipsimu.git] / application / ship-simu / main / filter / goverment / class_ShipSimuGovermentPaysTrainingFilter.php
index febd4bd2c8594c458b69f7892ff88043191ced31..81464998b636eb293d3080265a5e9d8907e3ec8f 100644 (file)
@@ -21,7 +21,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class ShipSimuGovermentPaysTrainingFilter extends BaseFrameworkSystem implements Filterable {
+class ShipSimuGovermentPaysTrainingFilter extends BaseShipSimuFilter implements Filterable {
        /**
         * Protected constructor
         *
@@ -30,16 +30,12 @@ class ShipSimuGovermentPaysTrainingFilter extends BaseFrameworkSystem implements
        protected function __construct () {
                // Call parent constructor
                parent::__construct(__CLASS__);
-
-               // Clean up a little
-               $this->removeNumberFormaters();
-               $this->removeSystemArray();
        }
 
        /**
         * Creates an instance of this filter class
         *
-        * @return      $filterInstance         An instance of this filter class
+        * @return      $filterInstance                 An instance of this filter class
         */
        public final static function createShipSimuGovermentPaysTrainingFilter () {
                // Get a new instance
@@ -58,6 +54,9 @@ class ShipSimuGovermentPaysTrainingFilter extends BaseFrameworkSystem implements
         * @todo        0% done
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Execute the parent execute method
+               parent::execute($requestInstance, $responseInstance);
+
                // Get the user instance from registry
                $userInstance = Registry::getRegistry()->getInstance('user');
 
@@ -66,11 +65,11 @@ class ShipSimuGovermentPaysTrainingFilter extends BaseFrameworkSystem implements
                        // Request is invalid
                        $requestInstance->requestIsValid(false);
 
-                       // Add a message to the response
-                       $responseInstance->addFatalMessage('goverment_pays_no_training');
+                       // Redirect to configured URL
+                       $responseInstance->redirectToConfiguredUrl('login_goverment_training_failed_url');
 
-                       // Abort here
-                       return false;
+                       // Stop processing here
+                       exit();
                } // END - if
        }
 }