private boolean checkUserCredentials(final String username, final String password, final boolean isPasswordHash) { boolean allowed = false; final AuthenticationService authenticationService = EnvTool.getAuthenticationService(); if (!isPasswordHash) { allowed = authenticationService.checkUserCredentials(username, password); } else { allowed = authenticationService.checkUserCredentialsWithPasswordHash(username, password); } return allowed; }