*
* @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
*
// 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();
// 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);
} // END - if
// Is the password correct?
- if (!$userInstance->ifPasswordHashMatches($requestInstance)) {
+ if ($userInstance->ifPasswordHashMatches($requestInstance) === false) {
// 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