diff options
author | Julien Veyssier <julien-nc@posteo.net> | 2023-03-22 15:21:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-22 15:21:29 +0100 |
commit | c838bdb8203b8a555f8371d31ae744351784b8bc (patch) | |
tree | d960373dfd88c6ae8619cf9e586fd08d6c35ce8c /apps/provisioning_api | |
parent | 014a6346359b89f15ca163149a29388b81cc8298 (diff) | |
parent | 77f7da99215aa0625c0091d97e288fecfaff07b0 (diff) | |
download | nextcloud-server-c838bdb8203b8a555f8371d31ae744351784b8bc.tar.gz nextcloud-server-c838bdb8203b8a555f8371d31ae744351784b8bc.zip |
Merge pull request #36665 from nextcloud/fix/36539
Always set displayname and display-name for user data
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/lib/Controller/AUserData.php | 2 | ||||
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/apps/provisioning_api/lib/Controller/AUserData.php b/apps/provisioning_api/lib/Controller/AUserData.php index 108d24576d9..bbb3abe3c24 100644 --- a/apps/provisioning_api/lib/Controller/AUserData.php +++ b/apps/provisioning_api/lib/Controller/AUserData.php @@ -12,6 +12,7 @@ declare(strict_types=1); * @author John Molakvoæ <skjnldsv@protonmail.com> * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Vincent Petry <vincent@nextcloud.com> + * @author Kate Döen <kate.doeen@nextcloud.com> * * @license GNU AGPL version 3 or any later version * @@ -175,6 +176,7 @@ abstract class AUserData extends OCSController { } $data[IAccountManager::PROPERTY_DISPLAYNAME] = $targetUserObject->getDisplayName(); + $data[IAccountManager::PROPERTY_DISPLAYNAME_LEGACY] = $data[IAccountManager::PROPERTY_DISPLAYNAME]; if ($includeScopes) { $data[IAccountManager::PROPERTY_DISPLAYNAME . self::SCOPE_SUFFIX] = $userAccount->getProperty(IAccountManager::PROPERTY_DISPLAYNAME)->getScope(); } diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 1613561fbe1..40f35136b84 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -24,6 +24,7 @@ declare(strict_types=1); * @author Thomas Müller <thomas.mueller@tmit.eu> * @author Tom Needham <tom@owncloud.com> * @author Vincent Petry <vincent@nextcloud.com> + * @author Kate Döen <kate.doeen@nextcloud.com> * * @license AGPL-3.0 * @@ -545,10 +546,6 @@ class UsersController extends AUserData { $user = $this->userSession->getUser(); if ($user) { $data = $this->getUserData($user->getUID(), true); - // rename "displayname" to "display-name" only for this call to keep - // the API stable. - $data['display-name'] = $data['displayname']; - unset($data['displayname']); return new DataResponse($data); } |