mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Delete matches when a user changes their phone number
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
3feca65399
commit
19ccc992d5
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue