aboutsummaryrefslogtreecommitdiffstats
path: root/apps/provisioning_api/lib/Controller
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2024-05-23 11:17:33 -0700
committerFerdinand Thiessen <opensource@fthiessen.de>2024-08-02 12:35:22 +0200
commit7f51a020765718e607fe44a634e0bd4855c99837 (patch)
treef0f0290074597d541c1958176d0160cd8e908f2f /apps/provisioning_api/lib/Controller
parent669e4e713d610e456759d0b912be2812438c88c9 (diff)
downloadnextcloud-server-7f51a020765718e607fe44a634e0bd4855c99837.tar.gz
nextcloud-server-7f51a020765718e607fe44a634e0bd4855c99837.zip
fix: Reset notification email automatically when deleting additonal email
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/provisioning_api/lib/Controller')
-rw-r--r--apps/provisioning_api/lib/Controller/UsersController.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php
index 46773f2f6a5..b0ddd4329af 100644
--- a/apps/provisioning_api/lib/Controller/UsersController.php
+++ b/apps/provisioning_api/lib/Controller/UsersController.php
@@ -838,6 +838,9 @@ class UsersController extends AUserData {
}
}
$this->accountManager->updateAccount($userAccount);
+ if ($value === '' && $key === $targetUser->getPrimaryEMailAddress()) {
+ $targetUser->setPrimaryEMailAddress('');
+ }
break;
case IAccountManager::COLLECTION_EMAIL . self::SCOPE_SUFFIX: