code: private String getSimpleUsername(String username) {
          String simpleUsername = username;
          if (defaultDomain != null) {
              // sanitize username
              if (username.startsWith(defaultDomain + "\\")) {
                  // strip default domain from domain\ username
                  simpleUsername = username.substring(defaultDomain.length() + 1);
              } else if (username.endsWith("@" + defaultDomain)) {
                  // strip default domain from username@domain
                  simpleUsername = username.substring(0, username.lastIndexOf('@'));
              }
          }
          return simpleUsername;
      }
docs: Returns a simple username without any domain prefixes.
  
  @param username
  @return a simple username