X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Fship-simu%2Fmain%2Flogin%2Fclass_ShipSimuGuestLogin.php;h=16f76ed73a57fa82a87035e9caa4e4b074f03b87;hb=4f70843ae8428f051d70ccff5bb43fc4c03dda8d;hp=d4b0365c4d58e40b7dcb986c81bb76cde983d2a4;hpb=5bf79580029c4f6ee71e6c9e7890169e4b344def;p=shipsimu.git diff --git a/application/ship-simu/main/login/class_ShipSimuGuestLogin.php b/application/ship-simu/main/login/class_ShipSimuGuestLogin.php index d4b0365..16f76ed 100644 --- a/application/ship-simu/main/login/class_ShipSimuGuestLogin.php +++ b/application/ship-simu/main/login/class_ShipSimuGuestLogin.php @@ -2,11 +2,11 @@ /** * A special guest login class for Ship-Simu * - * @author Roland Haeder + * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Ship-Simu 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 @@ -25,7 +25,7 @@ class ShipSimuGuestLogin extends BaseFrameworkSystem implements LoginableUser { /** * The hashed password */ - private $hashedPassword = ""; + private $hashedPassword = ''; /** * Protected constructor @@ -35,10 +35,6 @@ class ShipSimuGuestLogin extends BaseFrameworkSystem implements LoginableUser { protected function __construct () { // Call parent constructor parent::__construct(__CLASS__); - - // Clean up a little - $this->removeNumberFormaters(); - $this->removeSystemArray(); } /** @@ -46,7 +42,7 @@ class ShipSimuGuestLogin extends BaseFrameworkSystem implements LoginableUser { * * @return $loginInstance An instance of this login class */ - public final static function createShipSimuGuestLogin () { + public static final function createShipSimuGuestLogin () { // Get a new instance $loginInstance = new ShipSimuGuestLogin(); @@ -85,22 +81,16 @@ class ShipSimuGuestLogin extends BaseFrameworkSystem implements LoginableUser { if (is_null($method)) { // Then abort here throw new UserAuthMethodException($this, self::EXCEPTION_MISSING_METHOD); - } elseif (!method_exists($this->getConfigInstance()->readConfig('guest_class'), $method)) { + } elseif (!method_exists($this->getConfigInstance()->getConfigEntry('guest_class'), $method)) { // The method is invalid! throw new MissingMethodException(array($this, $method), self::EXCEPTION_MISSING_METHOD); } - // Get a instance of the registry - $userInstance = Registry::getRegistry()->getInstance('user'); - - // Is there an instance? - if (is_null($userInstance)) { - // Get a user instance - $userInstance = call_user_func_array(array($this->getConfigInstance()->readConfig('guest_class'), $method), array($data)); + // Get a user instance + $userInstance = call_user_func_array(array($this->getConfigInstance()->getConfigEntry('guest_class'), $method), array($data)); - // Remember this new instance in registry - Registry::getRegistry()->addInstance($userInstance); - } // END - if + // Remember this new instance in registry + Registry::getRegistry()->addInstance('user', $userInstance); // Is the password correct? if ($userInstance->ifPasswordHashMatches($requestInstance) === false) {