Missing nullability in IUmbracoUserManager
Which exact Umbraco version are you using? For example: 9.0.1 - don't just write v9
v10 versions
Bug summary
I was recently working with the IUmbracoUserManager and I noticed that most of the functions indicate that the result cannot be NULL. This isn't actually the case and it would be great if those could indicate that a NULL value could be present.
The ones that I can see are:
- FindByIdAsync
- FindByEmailAsync
- FindByNameAsync
Specifics
No response
Steps to reproduce
Try including a null check after the result of the functions above. Visual studio will add a warning saying that the result cannot be NULL, so a null check isn't needed. Even though NULL can be returned by the function.
Expected result / actual result
Functions should change their functions to be nullable.
Hi there @patrickdemooij9!
Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.
We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
- We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
- If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
- We'll replicate the issue to ensure that the problem is as described.
- We'll decide whether the behavior is an issue or if the behavior is intended.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.
Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:
Nicely spotted, seems like something we've overseen when doing the nullability changes.
Unfortunately, we can't really change this for V10, since it would be a breaking change, but coincidentally this is already being fixed in an unrelated PR for V11
@nikolajlauridsen Ah perfect! Would it be better to close this issue then or wait till the launch of V11 in case other people stumble upon this issue?
That is a great question 😄, I honestly don't know 😆
What do you think @nul800sebastiaan
I would close this one as fixed in v11 as soon as the related PR is merged. Then it's clear in the release notes later on as well!