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
|
@ -686,6 +686,10 @@ class UsersController extends AUserData {
|
||||||
$userAccount[$key]['value'] = $value;
|
$userAccount[$key]['value'] = $value;
|
||||||
try {
|
try {
|
||||||
$this->accountManager->updateUser($targetUser, $userAccount, true);
|
$this->accountManager->updateUser($targetUser, $userAccount, true);
|
||||||
|
|
||||||
|
if ($key === IAccountManager::PROPERTY_PHONE) {
|
||||||
|
$this->knownUserMapper->deleteKnownUser($targetUser->getUID());
|
||||||
|
}
|
||||||
} catch (\InvalidArgumentException $e) {
|
} catch (\InvalidArgumentException $e) {
|
||||||
throw new OCSException('Invalid ' . $e->getMessage(), 102);
|
throw new OCSException('Invalid ' . $e->getMessage(), 102);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue