Skip to content

Commit

Permalink
Merge pull request #45487 from nextcloud/fix/reset-notification-email
Browse files Browse the repository at this point in the history
fix: Reset notification email when deleting additonal email
  • Loading branch information
susnux authored Aug 2, 2024
2 parents 669e4e7 + 427c27a commit 1a51afd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions apps/provisioning_api/lib/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,9 @@ public function editUserMultiValue(
}
}
$this->accountManager->updateAccount($userAccount);
if ($value === '' && $key === $targetUser->getPrimaryEMailAddress()) {
$targetUser->setPrimaryEMailAddress('');
}
break;

case IAccountManager::COLLECTION_EMAIL . self::SCOPE_SUFFIX:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,9 @@ export default {
handleDeleteAdditionalEmail(status) {
if (status === 'ok') {
this.$emit('delete-additional-email')
if (this.isNotificationEmail) {
this.$emit('update:notification-email', '')
}
} else {
this.handleResponse({
errorMessage: t('settings', 'Unable to delete additional email address'),
Expand Down
4 changes: 2 additions & 2 deletions dist/settings-vue-settings-personal-info.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-vue-settings-personal-info.js.map

Large diffs are not rendered by default.

0 comments on commit 1a51afd

Please sign in to comment.