X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=application%2Fshipsimu%2Fmain%2Flogin%2Fclass_ShipSimuUserLogin.php;h=0b3cf7c2424b97642ca313f6d08b6179957bdbfd;hb=c05766cedd51503851746bbb7b5fb8d2f3e87a74;hp=cf43ef00b50e9e7a2b1083078eacff409cc47659;hpb=02a6b02f96d2193d2161e70477bf8f18a199389f;p=shipsimu.git diff --git a/application/shipsimu/main/login/class_ShipSimuUserLogin.php b/application/shipsimu/main/login/class_ShipSimuUserLogin.php index cf43ef0..0b3cf7c 100644 --- a/application/shipsimu/main/login/class_ShipSimuUserLogin.php +++ b/application/shipsimu/main/login/class_ShipSimuUserLogin.php @@ -21,7 +21,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -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);