X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Ffactories%2Flogin%2Fclass_LoginFactory.php;h=0f2719939eab0661d3c5f3a5963270d5fa1b791f;hp=01b042cc6a32f463b5f8b78471e603f3de2d2b2a;hb=27e0403074124968ff6588735afb0e1d7577ab76;hpb=30d996765c2587e3735f1c4289c5f90bd40f4520 diff --git a/inc/classes/main/factories/login/class_LoginFactory.php b/inc/classes/main/factories/login/class_LoginFactory.php index 01b042cc..0f271993 100644 --- a/inc/classes/main/factories/login/class_LoginFactory.php +++ b/inc/classes/main/factories/login/class_LoginFactory.php @@ -36,7 +36,7 @@ class LoginFactory extends ObjectFactory { * Returns a singleton login instance for given request instance. * * @param $requestInstance An instance of a Requestable class - * @return $wrapperInstance A database wrapper instance + * @return $loginInstance An instance of a login helper (@TODO Use actual interface name) */ public static final function createLoginObjectByRequest (Requestable $requestInstance) { // Get registry instance @@ -45,29 +45,29 @@ class LoginFactory extends ObjectFactory { // Do we have an instance in the registry? if ($registryInstance->instanceExists('login_helper')) { // Then use this instance - $userInstance = $registryInstance->getInstance('login_helper'); + $loginInstance = $registryInstance->getInstance('login_helper'); } else { // Probe on member instance try { // Get class name - $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry('user_class'); + $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry('user_login_class'); // Try to instance it - $userInstance = call_user_func_array(array($className, 'createMemberByRequest'), array($requestInstance)); + $loginInstance = call_user_func_array(array($className, 'createMemberByRequest'), array($requestInstance)); } catch (UnexpectedGuestAccountException $e) { // Then try it with guest account - $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry('guest_class'); + $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry('guest_login_class'); // Try to instance it - $userInstance = call_user_func_array(array($className, 'createGuestByRequest'), array($requestInstance)); + $loginInstance = call_user_func_array(array($className, 'createGuestByRequest'), array($requestInstance)); } // Set the instance in registry for further use - $registryInstance->addInstance('login_helper', $userInstance); + $registryInstance->addInstance('login_helper', $loginInstance); } // Return the instance - return $userInstance; + return $loginInstance; } }