Delete matches when a user changes their phone number
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
f62d9b50fd
commit
55a5d26c56
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue