diff options
author | Joas Schilling <coding@schilljs.com> | 2020-12-03 12:16:39 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-12-07 14:19:38 +0100 |
commit | f648635758e34bab0173e02eb9b75aafc5e6a9ff (patch) | |
tree | 2864de1966f655eeef2078d14b5837821869c17f /apps | |
parent | f0ca76aefbe7717b9555e0dffb8c9340e14bf3cf (diff) | |
download | nextcloud-server-f648635758e34bab0173e02eb9b75aafc5e6a9ff.tar.gz nextcloud-server-f648635758e34bab0173e02eb9b75aafc5e6a9ff.zip |
Make the throwing optional, so background tasks don't break
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 2 | ||||
-rw-r--r-- | apps/settings/lib/Controller/UsersController.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index edb1fc5121a..18baa07a395 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -655,7 +655,7 @@ class UsersController extends AUserData { if ($userAccount[$key]['value'] !== $value) { $userAccount[$key]['value'] = $value; try { - $this->accountManager->updateUser($targetUser, $userAccount); + $this->accountManager->updateUser($targetUser, $userAccount, true); } catch (\InvalidArgumentException $e) { throw new OCSException('Invalid ' . $e->getMessage(), 102); } diff --git a/apps/settings/lib/Controller/UsersController.php b/apps/settings/lib/Controller/UsersController.php index 5b3c1574f96..dba5ec69b2b 100644 --- a/apps/settings/lib/Controller/UsersController.php +++ b/apps/settings/lib/Controller/UsersController.php @@ -466,7 +466,7 @@ class UsersController extends Controller { } try { - return $this->accountManager->updateUser($user, $data); + return $this->accountManager->updateUser($user, $data, true); } catch (\InvalidArgumentException $e) { if ($e->getMessage() === IAccountManager::PROPERTY_PHONE) { throw new \InvalidArgumentException($this->l10n->t('Unable to set invalid phone number')); |