diff options
author | alecpl <alec@alec.pl> | 2008-11-03 12:16:15 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2008-11-03 12:16:15 +0000 |
commit | 7f59c01a4594a03be81d266032d967a302cc6a85 (patch) | |
tree | 17416b843148849ed9c44c53cc742ae6c1709540 /program | |
parent | c21d6d713e0320b7b61bff1fa0e05bbd250455bb (diff) |
#1485511: better handling for editing non-existing identities
Diffstat (limited to 'program')
-rw-r--r-- | program/steps/settings/edit_identity.inc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc index 78b204576..c8d448adb 100644 --- a/program/steps/settings/edit_identity.inc +++ b/program/steps/settings/edit_identity.inc @@ -27,6 +27,12 @@ if (($_GET['_iid'] || $_POST['_iid']) && $RCMAIL->action=='edit-identity') { if (is_array($IDENTITY_RECORD)) $OUTPUT->set_env('iid', $IDENTITY_RECORD['identity_id']); + else { + $OUTPUT->show_message('opnotpermitted', 'error'); + // go to identities page + rcmail_overwrite_action('identities'); + return; + } } // add-identity else { @@ -65,9 +71,6 @@ function rcube_identity_form($attrib) "theme_advanced_buttons3 : '',". "gecko_spellcheck : true });"); - if (!$IDENTITY_RECORD && $RCMAIL->action != 'add-identity') - return rcube_label('notfound'); - // add some labels to client $OUTPUT->add_label('noemailwarning', 'nonamewarning', 'converting'); |