Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2022-03-11 05:11:28 +0300
committerChristopher Ng <chrng8@gmail.com>2022-03-25 06:53:54 +0300
commit8bef2ec925824e9e788c1886fe8ea14322f15e9e (patch)
tree95700d0045fb92245a576d757d08d292d930a5cb /core/Controller
parent70163ec80ba1a71712ca946fdc3deb21f4b66f77 (diff)
Add global profile toggle config
Signed-off-by: Christopher Ng <chrng8@gmail.com> (cherry picked from commit 1fc0b4320c8921ad59bf4d41a88bf9936e1f653d)
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/ProfilePageController.php22
1 files changed, 1 insertions, 21 deletions
diff --git a/core/Controller/ProfilePageController.php b/core/Controller/ProfilePageController.php
index 505dfa4e249..38ea92968dc 100644
--- a/core/Controller/ProfilePageController.php
+++ b/core/Controller/ProfilePageController.php
@@ -26,13 +26,10 @@ declare(strict_types=1);
namespace OC\Core\Controller;
-use OC\KnownUser\KnownUserService;
use OC\Profile\ProfileManager;
-use OCP\Accounts\IAccountManager;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
-use OCP\IGroupManager;
use OCP\IRequest;
use OCP\IUser;
use OCP\IUserManager;
@@ -41,26 +38,16 @@ use OCP\Share\IManager as IShareManager;
use OCP\UserStatus\IManager as IUserStatusManager;
class ProfilePageController extends Controller {
- use \OC\Profile\TProfileHelper;
/** @var IInitialState */
private $initialStateService;
- /** @var IAccountManager */
- private $accountManager;
-
/** @var ProfileManager */
private $profileManager;
/** @var IShareManager */
private $shareManager;
- /** @var IGroupManager */
- private $groupManager;
-
- /** @var KnownUserService */
- private $knownUserService;
-
/** @var IUserManager */
private $userManager;
@@ -74,22 +61,16 @@ class ProfilePageController extends Controller {
$appName,
IRequest $request,
IInitialState $initialStateService,
- IAccountManager $accountManager,
ProfileManager $profileManager,
IShareManager $shareManager,
- IGroupManager $groupManager,
- KnownUserService $knownUserService,
IUserManager $userManager,
IUserSession $userSession,
IUserStatusManager $userStatusManager
) {
parent::__construct($appName, $request);
$this->initialStateService = $initialStateService;
- $this->accountManager = $accountManager;
$this->profileManager = $profileManager;
$this->shareManager = $shareManager;
- $this->groupManager = $groupManager;
- $this->knownUserService = $knownUserService;
$this->userManager = $userManager;
$this->userSession = $userSession;
$this->userStatusManager = $userStatusManager;
@@ -114,9 +95,8 @@ class ProfilePageController extends Controller {
return $profileNotFoundTemplate;
}
$visitingUser = $this->userSession->getUser();
- $targetAccount = $this->accountManager->getAccount($targetUser);
- if (!$this->isProfileEnabled($targetAccount)) {
+ if (!$this->profileManager->isProfileEnabled($targetUser)) {
return $profileNotFoundTemplate;
}