Skip to content

Conversation

@max-nextcloud
Copy link
Contributor

Backport of #39770

Overwrite the display name after the account is initialized when using an instacne of IGetDisplayNameBackend.

Before when using a variation of user_oidc and registering a Backend.php implementing IGetDisplayNameBackend
the personal setting page shows 'uid'.

The UserManager/AccountManager seems not to use consistently the correct backend.

The correct backend is used in this sequence:

server/lib/private/TemplateLayout.php

      $userDisplayName = \OC_User::getDisplayName();
      $this->assign(user_displayname, $userDisplayName);

In the settings page, it definitely not calls the registered backend, but seems to fall back to default Backend and shows (usually) uid or a value from the standard account property table.

@max-nextcloud max-nextcloud added this to the Nextcloud 25.0.11 milestone Aug 22, 2023
@max-nextcloud max-nextcloud changed the title fix: always use display name from correct backend [stable25] fix: always use display name from correct backend Aug 22, 2023
@blizzz blizzz mentioned this pull request Sep 5, 2023
@blizzz blizzz added the 3. to review Waiting for reviews label Sep 5, 2023
@blizzz
Copy link
Member

blizzz commented Sep 7, 2023

moving to 25.0.12

Overwrite the display name after the account is initialized
when using an instacne of IGetDisplayNameBackend.

Before when using a variation of user_oidc and registering
a Backend.php implementing IGetDisplayNameBackend
the personal setting page shows 'uid'.

The UserManager/AccountManager seems not to use consistently
the correct backend.

The correct backend is used in this sequence:

server/lib/private/TemplateLayout.php

          $userDisplayName = \OC_User::getDisplayName();
          $this->assign(user_displayname, $userDisplayName);

In the settings page, it definitely not calls the registered backend,
but seems to fall back to default Backend and shows (usually) uid
or a value from the standard account property table.

Signed-off-by: Max <[email protected]>
@max-nextcloud max-nextcloud force-pushed the backport/39770/stable25 branch from ca6a483 to 40056c8 Compare September 15, 2023 12:01
@juliusknorr juliusknorr added bug 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Sep 15, 2023
@blizzz blizzz mentioned this pull request Sep 20, 2023
@blizzz blizzz mentioned this pull request Oct 9, 2023
1 task
@blizzz blizzz merged commit 8fa780b into stable25 Oct 9, 2023
@blizzz blizzz deleted the backport/39770/stable25 branch October 9, 2023 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants