]> git.mxchange.org Git - shipsimu.git/blobdiff - application/ship-simu/main/login/class_ShipSimuUserLogin.php
generateUniqueId() and more useless/deprecated methods removed, code speed-up, link...
[shipsimu.git] / application / ship-simu / main / login / class_ShipSimuUserLogin.php
index 0a0c94451b469ff83f0198ff31e3571ec2c7ef7b..e3540405507a7b177f90ac8765d7599648063e6e 100644 (file)
@@ -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,8 +78,11 @@ 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 = User::createUserByRequest($requestInstance);
+                       $userInstance = call_user_func_array(array($userClass, 'createMemberByRequest'), array($requestInstance));
 
                        // Remember this new instance in registry
                        Registry::getRegistry()->addInstance($userInstance);
@@ -94,7 +91,7 @@ class ShipSimuUserLogin extends BaseFrameworkSystem implements LoginableUser {
                // Is the password correct?
                if (!$userInstance->ifPasswordHashMatches($requestInstance)) {
                        // Mismatching password
-                       throw new UserPasswordMismatchException(array($this, $userInstance), User::EXCEPTION_USER_PASS_MISMATCH);
+                       throw new UserPasswordMismatchException(array($this, $userInstance), BaseUser::EXCEPTION_USER_PASS_MISMATCH);
                } // END - if
 
                // ToDo place