diff --git a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/ChangeUserIdentifierCommand.java b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/ChangeUserIdentifierCommand.java index 74bcc14f00c..81acc62bc9a 100644 --- a/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/ChangeUserIdentifierCommand.java +++ b/src/main/java/edu/harvard/iq/dataverse/engine/command/impl/ChangeUserIdentifierCommand.java @@ -58,6 +58,13 @@ public void executeImpl(CommandContext ctxt) throws CommandException { BuiltinUser bu = ctxt.builtinUsers().findByUserName(oldIdentifier); au.setUserIdentifier(newIdentifier); + /* + 5/3/2019 + Related to 3575 and subsequent issues - we may decide to remove username from built in user as redundent + If so the code below will have to change, be careful around authenticated user lookup, could decide to leave as null if + AU lookup provider is built in. + */ + if (bu != null) { bu.setUserName(newIdentifier); AuthenticatedUserLookup aul = au.getAuthenticatedUserLookup();