User user = getUserModule().findUserByUserName(getUsername());
// in case module implementation doesn't throw proper
// exception...
if (user == null)
{
throw new NoSuchUserException("UserModule returned null user object");
}
//This is because LDAP binds can be non case sensitive
if (validateUserNameCase != null && validateUserNameCase.equalsIgnoreCase("true")
&& !getUsername().equals(user.getUserName()))