*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class LoginAfterRegistrationAction extends BaseAction implements Commandable {
+class LoginAfterRegistrationAction extends BaseAction implements PerformableAction {
/**
* Protected constructor
*
protected function __construct () {
// Call parent constructor
parent::__construct(__CLASS__);
-
- // Set description
- $this->setObjectDescription("Post registration action for logging in");
-
- // Generate unique key
- $this->generateUniqueId();
}
/**
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
// Get a login class from factory
- $loginInstance = ObjectFactory::createObjectByConfiguredName('login_user');
+ $loginInstance = ObjectFactory::createObjectByConfiguredName('user_login_class');
// Login the user by the request instance
- $loginInstance->doLogin($requestInstance);
+ $loginInstance->doLogin($requestInstance, $responseInstance);
// Was the login fine? Then redirect here
if ($loginInstance->ifLoginWasSuccessfull()) {
// Try to redirect here
try {
- $responseInstance->redirectConfiguredUrl('app_login');
+ $responseInstance->redirectToConfiguredUrl('app_login_url');
} catch (FrameworkException $e) {
// Something went wrong here!
$responseInstance->addFatalMessage($e->getMessage());