Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[full-ci] getting personal space by userId instead of userName#1553

Merged
v-scharf merged 4 commits into
mainfrom
useUserIdInsteadofName
Sep 26, 2025
Merged

[full-ci] getting personal space by userId instead of userName#1553
v-scharf merged 4 commits into
mainfrom
useUserIdInsteadofName

Conversation

@v-scharf

@v-scharf v-scharf commented Sep 24, 2025

Copy link
Copy Markdown
Contributor
  • Removed getUserIdByUserName() → replaced with getAttributeOfCreatedUser($user, 'id'), which reduces the number of requests to /graph/v1.0/users.

  • Added getPersonalSpace(), which retrieves a space by userId (instead of by name) via /graph/v1.0/users/{userId}?%24select=&%24expand=drive, ensuring the correct personal space is found even in case of duplicates (e.g., soft-deleted users).

@v-scharf v-scharf changed the title getting personal space by userId instead of userName [full-ci] getting personal space by userId instead of userName Sep 25, 2025
@v-scharf v-scharf marked this pull request as ready for review September 25, 2025 12:47

@rhafer rhafer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am by no means a PHP coder, so I didn't really review the code style an stuff. But the way you get the personal space now looks fine to me.

Comment thread tests/acceptance/bootstrap/GraphContext.php Outdated
@v-scharf v-scharf merged commit 723340d into main Sep 26, 2025
99 checks passed
@v-scharf v-scharf deleted the useUserIdInsteadofName branch September 26, 2025 08:51
@openclouders openclouders mentioned this pull request Sep 26, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants