} else {
user = userDAO.find(username);
if (user != null) {
if (user.isSuspended() != null && user.isSuspended()) {
throw new DisabledException("User " + user.getUsername() + " is suspended");
}
SyncopeConf authStatuses = confDAO.find("authentication.statuses", null);
if (authStatuses != null) {
String[] statuses = authStatuses.getValue().split("\\|");
if (!ArrayUtils.contains(statuses, user.getStatus())) {
throw new DisabledException("User " + user.getUsername() + " not allowed to authenticate");
}
}
authenticated = authenticate(
authentication.getCredentials().toString(),