diff options
author | Joas Schilling <coding@schilljs.com> | 2021-03-09 20:32:50 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-03-10 15:05:48 +0100 |
commit | 55a5d26c562c5221c93f191532372cc8fde76adb (patch) | |
tree | 72af64c6fd7a37f00772c40662edfc4da82cd172 /apps/provisioning_api | |
parent | f62d9b50fda96fe2acd6ebb2eb11e1f6bcf54116 (diff) | |
download | nextcloud-server-55a5d26c562c5221c93f191532372cc8fde76adb.tar.gz nextcloud-server-55a5d26c562c5221c93f191532372cc8fde76adb.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 9cc8372daa4..648faf8ad20 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -699,6 +699,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); } |