-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
feat: add api to get a user object without verifying they exist #57519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Robin Appelman <[email protected]>
5b1588a to
5924a2e
Compare
| * @return IUser | ||
| * @since 33.0.0 | ||
| */ | ||
| public function getExistingUser(string $userId, ?string $displayName = null): IUser; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would call it getLazyUser.
getExistingUser confuses me, to me it sounds like it will check that the user exists because I want to make sure it exists, not that it will skip the check because I already did it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intentionally avoided "lazy" in the naming because that's an implementation details, from an API consumer POV the main difference is whether or not the existence is verified.
Open for other options though
The current alternative is to manually create a
LazyUser, but that api isn't public. Adding a public api has been long discussed, so lets actually get one in.For 34 since api freeze for 33 has past.