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

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@102156 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Will Rossiter 2010-04-07 03:26:05 +00:00 committed by Sam Minnee
parent 3ddf6c7d5b
commit 1491fc9358

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);
}