Skip to content

Commit 1a51afd

Browse files
authored
Merge pull request #45487 from nextcloud/fix/reset-notification-email
fix: Reset notification email when deleting additonal email
2 parents 669e4e7 + 427c27a commit 1a51afd

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

apps/provisioning_api/lib/Controller/UsersController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,9 @@ public function editUserMultiValue(
838838
}
839839
}
840840
$this->accountManager->updateAccount($userAccount);
841+
if ($value === '' && $key === $targetUser->getPrimaryEMailAddress()) {
842+
$targetUser->setPrimaryEMailAddress('');
843+
}
841844
break;
842845

843846
case IAccountManager::COLLECTION_EMAIL . self::SCOPE_SUFFIX:

apps/settings/src/components/PersonalInfo/EmailSection/Email.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,9 @@ export default {
356356
handleDeleteAdditionalEmail(status) {
357357
if (status === 'ok') {
358358
this.$emit('delete-additional-email')
359+
if (this.isNotificationEmail) {
360+
this.$emit('update:notification-email', '')
361+
}
359362
} else {
360363
this.handleResponse({
361364
errorMessage: t('settings', 'Unable to delete additional email address'),

dist/settings-vue-settings-personal-info.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-vue-settings-personal-info.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)