]> source.dussan.org Git - nextcloud-server.git/commit
fix: always use display name from correct backend 39949/head
authorMax <max@nextcloud.com>
Wed, 9 Aug 2023 07:33:07 +0000 (09:33 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Thu, 17 Aug 2023 21:49:28 +0000 (21:49 +0000)
commitf32dccd54097d21e3fbf52a6bfd22fdb20201b65
tree4aaa50ef032853aed86b396d9afb1472cef41d60
parent362acd93aaffdb1271c8d5356cd2d6ea4ffaf9e1
fix: always use display name from correct backend

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 <max@nextcloud.com>
lib/private/Accounts/AccountManager.php