summaryrefslogtreecommitdiff
path: root/program/steps/settings/delete_identity.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/settings/delete_identity.inc')
-rw-r--r--program/steps/settings/delete_identity.inc15
1 files changed, 9 insertions, 6 deletions
diff --git a/program/steps/settings/delete_identity.inc b/program/steps/settings/delete_identity.inc
index 06bcab906..42c1da61f 100644
--- a/program/steps/settings/delete_identity.inc
+++ b/program/steps/settings/delete_identity.inc
@@ -31,13 +31,16 @@ if (!$OUTPUT->ajax_call && !$RCMAIL->check_request(RCUBE_INPUT_GPC)) {
if ($iid && preg_match('/^[0-9]+(,[0-9]+)*$/', $iid))
{
$plugin = $RCMAIL->plugins->exec_hook('identity_delete', array('id' => $iid));
-
- if (!$plugin['abort'] && $USER->delete_identity($iid)) {
- $OUTPUT->show_message('deletedsuccessfully', 'confirmation', null, false);
- }
- else {
- $OUTPUT->show_message('nodeletelastidentity', 'error', null, false);
+
+ if (!$plugin['abort']) {
+ if ($USER->delete_identity($iid)) {
+ $OUTPUT->show_message('deletedsuccessfully', 'confirmation', null, false);
+ }
+ else {
+ $OUTPUT->show_message('nodeletelastidentity', 'error', null, false);
+ }
}
+
// send response
if ($OUTPUT->ajax_call)
$OUTPUT->send();