BUGFIX: fallback to the standard authenticator before throwing user_error as in some cases auth method is not passed back to the login form (from r102156)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112062 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-13 01:36:12 +00:00
parent 890ac94a6a
commit 16277e5299

View File

@ -237,7 +237,12 @@ class Security extends Controller {
return call_user_func(array($authenticator, 'get_login_form'), $this);
}
}
else {
if($authenticator = Authenticator::get_default_authenticator()) {
return call_user_func(array($authenticator, 'get_login_form'), $this);
}
}
user_error('Passed invalid authentication method', E_USER_ERROR);
}