Cleanup of old stuff.
[shipsimu.git] / application / shipsimu / main / login / class_ShipSimuUserLogin.php
index cf43ef00b50e9e7a2b1083078eacff409cc47659..0b3cf7c2424b97642ca313f6d08b6179957bdbfd 100644 (file)
@@ -21,7 +21,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-class ShipSimuUserLogin extends BaseFrameworkSystem implements LoginableUser {
+class ShipSimuUserLogin extends BaseFrameworkSystem implements LoginableUser, Registerable {
        /**
         * The hashed password
         */
@@ -65,15 +65,8 @@ class ShipSimuUserLogin extends BaseFrameworkSystem implements LoginableUser {
         * @todo        user account.
         */
        public function doLogin (Requestable $requestInstance, Responseable $responseInstance) {
-               // By default no method is selected
-               $method = null;
-               $data = "";
-
-               // Get member class
-               $userClass = $this->getConfigInstance()->getConfigEntry('user_class');
-
                // Get a user instance
-               $userInstance = call_user_func_array(array($userClass, 'createMemberByRequest'), array($requestInstance));
+               $userInstance = LoginFactory::createLoginObjectByRequest($requestInstance);
 
                // Remember this new instance in registry
                Registry::getRegistry()->addInstance('user', $userInstance);