Skip to content
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

Use LazyUser when creating the user folder #33578

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Aug 17, 2022

Meme channel query count:

Before After
86 69

@skjnldsv skjnldsv mentioned this pull request Aug 18, 2022
@nickvergessen nickvergessen force-pushed the bugfix/noid/use-a-lazy-user-when-creating-the-root-folder branch from 6d529ce to 35d7b4e Compare August 18, 2022 09:38
@PVince81
Copy link
Member

psalm seems unhappy

@@ -362,7 +363,7 @@ public function getName() {
* @throws NotPermittedException
*/
public function getUserFolder($userId) {
$userObject = $this->userManager->get($userId);
$userObject = new LazyUser($userId, $this->userManager);

if (is_null($userObject)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Can someone confirm it's save to remove this full block?

@@ -362,7 +363,7 @@ public function getName() {
* @throws NotPermittedException
*/
public function getUserFolder($userId) {
$userObject = $this->userManager->get($userId);
$userObject = new LazyUser($userId, $this->userManager);

if (is_null($userObject)) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (is_null($userObject)) {
if (is_null($userObject->getDisplayName())) {

Copy link
Member

Choose a reason for hiding this comment

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

Oh wait that won't work 😩

@blizzz blizzz mentioned this pull request Aug 24, 2022
This was referenced Aug 30, 2022
@blizzz blizzz mentioned this pull request Sep 9, 2022
@skjnldsv skjnldsv mentioned this pull request Sep 15, 2022
This was referenced Sep 20, 2022
@blizzz blizzz modified the milestones: Nextcloud 25, Nextcloud 26 Sep 22, 2022
@blizzz blizzz mentioned this pull request Feb 1, 2023
@skjnldsv skjnldsv mentioned this pull request Feb 23, 2023
@blizzz blizzz mentioned this pull request Mar 7, 2023
@nickvergessen
Copy link
Member Author

/rebase

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nextcloud-command nextcloud-command force-pushed the bugfix/noid/use-a-lazy-user-when-creating-the-root-folder branch from 35d7b4e to 6a2f2a1 Compare March 7, 2023 19:59
@nickvergessen
Copy link
Member Author

Closing for now as we still see the error in our log from time to time which would then be unreachable

@nickvergessen nickvergessen deleted the bugfix/noid/use-a-lazy-user-when-creating-the-root-folder branch March 8, 2023 07:54
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.

6 participants