remove session.setUser(pre-save user) on email change #8643 #8644
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
When you change your email, the tabs on the user page are blank.
Which issue(s) this PR closes:
Special notes for your reviewer:
I'm not sure why
session.setUser(currentUser)
is here (it was added in b13f9be) and removing it seems to help.There are still weird messages in server.log but fewer than the stacktrace seen in #8643.
When you click "Save Changes":
[2022-04-22T14:40:23.267-0400] [Payara 5.2021.5] [WARNING] [jsf.externalcontext.flash.response.already.committed] [javax.enterprise.resource.webcontainer.jsf.flash] [tid: _ThreadID=116 _ThreadName=http-thread-pool::http-listener-1(1)] [timeMillis: 1650652823267] [levelValue: 900] [[
JSF1095: The response was already committed by the time we tried to set the outgoing cookie for the flash. Any values stored to the flash will not be available on the next request.]]
When you click another tab and then go back to "Account Information":
[2022-04-22T14:40:46.258-0400] [Payara 5.2021.5] [WARNING] [] [] [tid: _ThreadID=116 _ThreadName=http-thread-pool::http-listener-1(1)] [timeMillis: 1650652846258] [levelValue: 900] [[
Response has already been committed, and further write operations are not permitted. This may result in an IllegalStateException being triggered by the underlying application. To avoid this situation, consider adding a Rule
.when(Direction.isInbound().and(Response.isCommitted())).perform(Lifecycle.abort())
, or figure out where the response is being incorrectly committed and correct the bug in the offending code.]]Suggestions on how to test this:
#8643 contains steps.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Yes, instead of going to "My Data"on email change, you stay on "Account Information" which looks like this:
Is there a release notes update needed for this change?:
No.
Additional documentation:
None.