$loginInstance->setRequestInstance($requestInstance);
// Encrypt the password
- $loginInstance->encryptPassword('pass');
+ $loginInstance->encryptPassword('passwd');
// Do the login here
$loginInstance->doLogin($requestInstance, $responseInstance);
* @todo Add more filters
*/
public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
- // Which login type do we have?
- switch ($this->getConfigInstance()->readConfig('login_type')) {
- case "username": // Login via username
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_verifier_class'));
- break;
-
- case "email": // Login via email
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('email_verifier_class'));
- break;
-
- default: // Wether username or email is set
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('username_email_verifier_class'));
- break;
- }
+ // Add username
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_guest_verifier_class'));
// Add password verifier filter
- $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('password_verifier_class'));
+ $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('passwd_guest_verifier_class'));
}
}