public class AccountStatusChecker implements UserDetailChecker {
protected TextResource textResource;
public void check(UserDetail user) {
if (user.isAccountLocked()) { throw new LockedException(textResource.getText(
"AbstractUserDetailsAuthenticationProvider.locked", "User account is locked"), user); }
if (!user.isEnabled()) { throw new DisabledException(textResource.getText(
"AbstractUserDetailsAuthenticationProvider.disabled", "User is disabled"), user); }