X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Ffactories%2Flogin%2Fclass_LoginFactory.php;h=63db93d5d3f76febae3afbf7294942b1549f0e58;hp=0f2719939eab0661d3c5f3a5963270d5fa1b791f;hb=20812e0d711b450fed15dcf66ac8beb5d84897fe;hpb=27e0403074124968ff6588735afb0e1d7577ab76 diff --git a/inc/classes/main/factories/login/class_LoginFactory.php b/inc/classes/main/factories/login/class_LoginFactory.php index 0f271993..63db93d5 100644 --- a/inc/classes/main/factories/login/class_LoginFactory.php +++ b/inc/classes/main/factories/login/class_LoginFactory.php @@ -49,17 +49,11 @@ class LoginFactory extends ObjectFactory { } else { // Probe on member instance try { - // Get class name - $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry('user_login_class'); - - // Try to instance it - $loginInstance = call_user_func_array(array($className, 'createMemberByRequest'), array($requestInstance)); + // Try to instance member login class + $loginInstance = self::createObjectByConfiguredName('user_login_class', array($requestInstance)); } catch (UnexpectedGuestAccountException $e) { - // Then try it with guest account - $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry('guest_login_class'); - - // Try to instance it - $loginInstance = call_user_func_array(array($className, 'createGuestByRequest'), array($requestInstance)); + // Then try guest login + $loginInstance = self::createObjectByConfiguredName('guest_login_class', array($requestInstance)); } // Set the instance in registry for further use