X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=application%2Fship-simu%2Fmain%2Flogin%2Fclass_ShipSimuUserLogin.php;h=541e18810234714cf464e1fcc9d7b34965b5a06b;hb=bbf48d46cb9063a4d2b78c106747147712f5474e;hp=367103ca2021995e23bedf871ac2aa4524da2b27;hpb=8ba5a30e52e7cd8adb76f675ab3f7129a60819e3;p=shipsimu.git diff --git a/application/ship-simu/main/login/class_ShipSimuUserLogin.php b/application/ship-simu/main/login/class_ShipSimuUserLogin.php index 367103c..541e188 100644 --- a/application/ship-simu/main/login/class_ShipSimuUserLogin.php +++ b/application/ship-simu/main/login/class_ShipSimuUserLogin.php @@ -36,12 +36,6 @@ class ShipSimuUserLogin extends BaseFrameworkSystem implements LoginableUser { // Call parent constructor parent::__construct(__CLASS__); - // Set part description - $this->setObjectDescription("Login for Ship-Simu"); - - // Create unique ID number - $this->generateUniqueId(); - // Clean up a little $this->removeNumberFormaters(); $this->removeSystemArray(); @@ -84,15 +78,18 @@ class ShipSimuUserLogin extends BaseFrameworkSystem implements LoginableUser { // Is there an instance? if (is_null($userInstance)) { + // Get member class + $userClass = $this->getConfigInstance()->readConfig('user_class'); + // Get a user instance - $userInstance = Member::createUserByRequest($requestInstance); + $userInstance = call_user_func_array(array($userClass, 'createMemberByRequest'), array($requestInstance)); // Remember this new instance in registry Registry::getRegistry()->addInstance($userInstance); } // END - if // Is the password correct? - if (!$userInstance->ifPasswordHashMatches($requestInstance)) { + if ($userInstance->ifPasswordHashMatches($requestInstance) === false) { // Mismatching password throw new UserPasswordMismatchException(array($this, $userInstance), BaseUser::EXCEPTION_USER_PASS_MISMATCH); } // END - if