mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 01:00:50 -04:00
Merge pull request #39991 from nextcloud/backport/39770/stable26
[stable26] fix: always use display name from correct backend
This commit is contained in:
commit
dc73199e2f
1 changed files with 5 additions and 0 deletions
|
|
@ -61,6 +61,7 @@ use OCP\L10N\IFactory;
|
|||
use OCP\Mail\IMailer;
|
||||
use OCP\Security\ICrypto;
|
||||
use OCP\Security\VerificationToken\IVerificationToken;
|
||||
use OCP\User\Backend\IGetDisplayNameBackend;
|
||||
use OCP\Util;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
|
|
@ -800,6 +801,10 @@ class AccountManager implements IAccountManager {
|
|||
return $this->internalCache->get($user->getUID());
|
||||
}
|
||||
$account = $this->parseAccountData($user, $this->getUser($user));
|
||||
if ($user->getBackend() instanceof IGetDisplayNameBackend) {
|
||||
$property = $account->getProperty(self::PROPERTY_DISPLAYNAME);
|
||||
$account->setProperty(self::PROPERTY_DISPLAYNAME, $user->getDisplayName(), $property->getScope(), $property->getVerified());
|
||||
}
|
||||
$this->internalCache->set($user->getUID(), $account);
|
||||
return $account;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue