diff options
author | Joas Schilling <coding@schilljs.com> | 2021-03-09 20:32:50 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-03-11 08:39:29 +0100 |
commit | 19ccc992d5be9a3e493dda8c2c5f4c00ab7ba8bc (patch) | |
tree | 83e06bb2d3c9ec9f6251f7b54427d17ba734c6d5 /apps/provisioning_api | |
parent | 3feca65399d1d4d1183d6c052eae815d5b9cdc77 (diff) | |
download | nextcloud-server-19ccc992d5be9a3e493dda8c2c5f4c00ab7ba8bc.tar.gz nextcloud-server-19ccc992d5be9a3e493dda8c2c5f4c00ab7ba8bc.zip |
Delete matches when a user changes their phone number
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 803bdf6d91a..70450756be7 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -686,6 +686,10 @@ class UsersController extends AUserData { $userAccount[$key]['value'] = $value; try { $this->accountManager->updateUser($targetUser, $userAccount, true); + + if ($key === IAccountManager::PROPERTY_PHONE) { + $this->knownUserMapper->deleteKnownUser($targetUser->getUID()); + } } catch (\InvalidArgumentException $e) { throw new OCSException('Invalid ' . $e->getMessage(), 102); } |