Skip to content

Commit

Permalink
fix: Reset notification email automatically when deleting additonal e…
Browse files Browse the repository at this point in the history
…mail

Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal committed May 23, 2024
1 parent 500a9cb commit ec7b9eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 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 @@ -806,6 +806,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 @@ -374,6 +374,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

0 comments on commit ec7b9eb

Please sign in to comment.