code: public static String sanitizeIdentifier(final BasicUserProfile profile, final Object id) {
          if (id != null) {
              String sId = id.toString();
              if (profile != null) {
                  final String type = profile.getClass().getName() + BasicUserProfile.SEPARATOR;
                  if (sId.startsWith(type)) {
                      sId = sId.substring(type.length());
                  }
              }
              return sId;
          }
          return null;
      }
docs: Sanitize into a string identifier.
  
  @param profile the user profile
  @param id the identifier object
  @return the sanitized identifier