aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller/UserController.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/Controller/UserController.php')
-rw-r--r--core/Controller/UserController.php41
1 files changed, 12 insertions, 29 deletions
diff --git a/core/Controller/UserController.php b/core/Controller/UserController.php
index b9946dfaec6..b6e464d9a95 100644
--- a/core/Controller/UserController.php
+++ b/core/Controller/UserController.php
@@ -1,54 +1,37 @@
<?php
+
/**
- * @copyright Copyright (c) 2016, ownCloud, Inc.
- *
- * @author Christoph Wurst <christoph@winzerhof-wurst.at>
- * @author Lukas Reschke <lukas@statuscode.ch>
- * @author Morris Jobke <hey@morrisjobke.de>
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OC\Core\Controller;
use OCP\AppFramework\Controller;
+use OCP\AppFramework\Http\Attribute\FrontpageRoute;
+use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;
use OCP\IUserManager;
class UserController extends Controller {
- protected IUserManager $userManager;
-
- public function __construct($appName,
- IRequest $request,
- IUserManager $userManager
+ public function __construct(
+ string $appName,
+ IRequest $request,
+ protected IUserManager $userManager,
) {
parent::__construct($appName, $request);
- $this->userManager = $userManager;
}
/**
* Lookup user display names
*
- * @NoAdminRequired
- *
* @param array $users
*
* @return JSONResponse
*/
+ #[NoAdminRequired]
+ #[FrontpageRoute(verb: 'POST', url: '/displaynames')]
public function getDisplayNames($users) {
$result = [];