diff options
author | jld3103 <jld3103yt@gmail.com> | 2023-02-10 21:52:49 +0100 |
---|---|---|
committer | jld3103 <jld3103yt@gmail.com> | 2023-02-10 21:52:54 +0100 |
commit | 77f7da99215aa0625c0091d97e288fecfaff07b0 (patch) | |
tree | 8bc6fdbd7f2ef6a67d839a1102f768a6da886b0c /apps/provisioning_api | |
parent | e0946a1608283bd376f439906c50f3a4eb810839 (diff) | |
download | nextcloud-server-77f7da99215aa0625c0091d97e288fecfaff07b0.tar.gz nextcloud-server-77f7da99215aa0625c0091d97e288fecfaff07b0.zip |
Always set displayname and display-name for user data
Signed-off-by: jld3103 <jld3103yt@gmail.com>
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 97d66acd2e0..f5bbf4899a4 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 * @@ -546,10 +547,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); } |