X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=application%2Fship-simu%2Fmain%2Flogin%2Fclass_ShipSimuUserLogin.php;h=f52097fd6406df3438d66835bd8cb4be5492cadd;hp=178c4088a7b81c744c685834d2775599c9fb835c;hb=f4d7d95f2a03111bbe5f2101d258f0daa67eacb4;hpb=94d6fb712c4f0630a842197ea735ebc4ba737fd0 diff --git a/application/ship-simu/main/login/class_ShipSimuUserLogin.php b/application/ship-simu/main/login/class_ShipSimuUserLogin.php index 178c408..f52097f 100644 --- a/application/ship-simu/main/login/class_ShipSimuUserLogin.php +++ b/application/ship-simu/main/login/class_ShipSimuUserLogin.php @@ -73,24 +73,19 @@ class ShipSimuUserLogin extends BaseFrameworkSystem implements LoginableUser { $method = null; $data = ""; - // Get a instance of the registry - $userInstance = Registry::getRegistry()->getInstance('user'); + // Get member class + $userClass = $this->getConfigInstance()->readConfig('user_class'); - // Is there an instance? - if (is_null($userInstance)) { - // Get member class - $userClass = $this->getConfigInstance()->readConfig('user_class'); + // Get a user instance + $userInstance = call_user_func_array(array($userClass, 'createMemberByRequest'), array($requestInstance)); - // Get a user instance - $userInstance = call_user_func_array(array($userClass, 'createMemberByRequest'), array($requestInstance)); - - // 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) { // Mismatching password + $userInstance->debugInstance(); throw new UserPasswordMismatchException(array($this, $userInstance), BaseUser::EXCEPTION_USER_PASS_MISMATCH); } // END - if