diff options
author | Christopher Ng <chrng8@gmail.com> | 2021-10-14 11:19:40 +0300 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2021-10-19 07:59:35 +0300 |
commit | 309354852f12ae88d5eef05d311d6ebcba8ee762 (patch) | |
tree | 640c4e2394ba2a868d8d1cb6b5271fd1271bbdab /apps/provisioning_api | |
parent | 7215148a242815a5064ce5d00a387c634dc936f3 (diff) |
Profile backend
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 714759ccc0f..38d51857ffc 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -721,11 +721,11 @@ class UsersController extends AUserData { * * @param string $userId * @param string $key - * @param string|bool $value + * @param string $value * @return DataResponse * @throws OCSException */ - public function editUser(string $userId, string $key, $value): DataResponse { + public function editUser(string $userId, string $key, string $value): DataResponse { $currentLoggedInUser = $this->userSession->getUser(); $targetUser = $this->userManager->get($userId); @@ -961,11 +961,6 @@ class UsersController extends AUserData { $this->accountManager->updateAccount($userAccount); break; case IAccountManager::PROPERTY_PROFILE_ENABLED: - if (!is_bool($value)) { - throw new OCSException('Invalid value, value must be a boolean', 102); - } - $value = $value === true ? '1' : '0'; - $userAccount = $this->accountManager->getAccount($targetUser); try { $userProperty = $userAccount->getProperty($key); |