Skip to content

Conversation

@icewind1991
Copy link
Member

@icewind1991 icewind1991 commented Jan 13, 2026

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.

@icewind1991 icewind1991 requested a review from a team as a code owner January 13, 2026 14:36
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Jan 13, 2026
@icewind1991 icewind1991 requested review from leftybournes, nfebe, salmart-dev and yemkareems and removed request for a team January 13, 2026 14:36
* @return IUser
* @since 33.0.0
*/
public function getExistingUser(string $userId, ?string $displayName = null): IUser;
Copy link
Contributor

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.

Copy link
Member Author

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

@icewind1991 icewind1991 merged commit 6eb8e8d into master Jan 14, 2026
254 of 272 checks passed
@icewind1991 icewind1991 deleted the get-existing-api branch January 14, 2026 10:15
@nextcloud-bot nextcloud-bot mentioned this pull request Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants