diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-03-11 05:11:28 +0300 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2022-03-18 05:55:12 +0300 |
commit | 1fc0b4320c8921ad59bf4d41a88bf9936e1f653d (patch) | |
tree | 8d630f864f4a2760f72307e68553cc2ee0c516d4 /core/Controller | |
parent | d364edcf6a18fa237dc53f6b95614851ed5fdc9a (diff) |
Add global profile toggle config
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'core/Controller')
-rw-r--r-- | core/Controller/ProfilePageController.php | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/core/Controller/ProfilePageController.php b/core/Controller/ProfilePageController.php index 8b1ecb6c98e..5a1c8a68e6b 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; } |