diff --git a/game-core/src/main/java/games/strategy/triplea/settings/SelectionComponentFactory.java b/game-core/src/main/java/games/strategy/triplea/settings/SelectionComponentFactory.java index 6a96066ac05..f03341155f2 100644 --- a/game-core/src/main/java/games/strategy/triplea/settings/SelectionComponentFactory.java +++ b/game-core/src/main/java/games/strategy/triplea/settings/SelectionComponentFactory.java @@ -793,6 +793,10 @@ public void save(final SaveContext context) { context.setValue(usernameSetting, usernameField.getText().toCharArray()); // TODO error reporting + } else { + context.setValue(usernameSetting, null); + context.setValue(uidSetting, null); + context.setValue(tokenSetting, null); } oldUserId.ifPresent( @@ -803,6 +807,7 @@ public void save(final SaveContext context) { } catch (final InterruptedException e) { Thread.currentThread().interrupt(); } + /*final String username = usernameField.getText(); context.setValue(uidSetting, username.isEmpty() ? null : username.toCharArray()); withSensitiveArray(