]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/actions/post_registration/class_LoginAfterRegistrationAction.php
Added new factory (unfinished) + some fixes.
[core.git] / inc / classes / main / actions / post_registration / class_LoginAfterRegistrationAction.php
index 15fd499af9c85d75ec7bc9931f9dbcb35c535212..f41843c8fd14a68feb4c87d033d17e9899411837 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * A post registration action to login after the registration is done
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.org
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@ class LoginAfterRegistrationAction extends BaseAction implements PerformableActi
         *
         * @return      $actionInstance         An instance of this action class
         */
-       public final static function createLoginAfterRegistrationAction () {
+       public static final function createLoginAfterRegistrationAction () {
                // Get a new instance
                $actionInstance = new LoginAfterRegistrationAction();
 
@@ -54,7 +54,8 @@ class LoginAfterRegistrationAction extends BaseAction implements PerformableActi
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Get a login class from factory
-               $loginInstance = ObjectFactory::createObjectByConfiguredName('user_login_class');
+               $loginInstance = LoginFactory::createLoginObjectByRequest($requestInstance);
+               die('<pre>'.print_r($loginInstance, TRUE).'</pre>');
 
                // Login the user by the request instance
                $loginInstance->doLogin($requestInstance, $responseInstance);
@@ -64,7 +65,7 @@ class LoginAfterRegistrationAction extends BaseAction implements PerformableActi
                        // Try to redirect here
                        try {
                                // Redirect...
-                               $responseInstance->redirectToConfiguredUrl('app_login_url');
+                               $responseInstance->redirectToConfiguredUrl('app_login');
 
                                // Stop here
                                exit();