nullpointer fix when getting notification with newly created user#8969
nullpointer fix when getting notification with newly created user#8969landreev merged 5 commits intoIQSS:developfrom
Conversation
|
After some testing: when a user is created with shibboleth in UI, that user is directly set in the session. It gives nullpointer until you log out and log in again (user is loaded from database). This pull request should fix that. |
|
I moved this to review because just now @donsizemore logged into Harvard Dataverse with a new Shib account and got a 500 error when he clicked My Data. As far as we understand, the workaround (until this PR is merged) is to log out and back in. That way the "muted emails" code checks the database and is initialized. |
|
This workaround is valid. Technically, it is a little bit different: with log-out and log-in again nothing is written in DB, but the object is initialized differently (muted e-mails are empty i.s.o. being null). This pull request fixes the initialization of the object when it is constructed by creating a new account (it was the case I had missed when making the initial pull request). Until you mute something, nothing is written in DB. |
|
Phil points out that testing of this will not be straightforward based on our current environment. To do this the right way - will require a full Shiboleth setup. This calls out that we do not have a current shiboleth environment. For this we'll do this with the artificial dev mode for this PR. |
What this PR does / why we need it:
This fixes the nullpointer on DataverseUserPage when creating a new user.