summaryrefslogtreecommitdiff
path: root/program/steps/settings/edit_identity.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-09-15 14:53:57 +0000
committerthomascube <thomas@roundcube.net>2008-09-15 14:53:57 +0000
commitf645ce169e11339d45cbc0b5b4cf6154346fd4c7 (patch)
tree119de2f39e224d28c5fc8be0967bfb43e4320a27 /program/steps/settings/edit_identity.inc
parent3e1e7750834edfe0062c83d66690f4fe4521b8ba (diff)
Redesign of the identities settings + add config option to disable multiple identities
Diffstat (limited to 'program/steps/settings/edit_identity.inc')
-rw-r--r--program/steps/settings/edit_identity.inc14
1 files changed, 10 insertions, 4 deletions
diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc
index 46918cb9e..1e3fa3494 100644
--- a/program/steps/settings/edit_identity.inc
+++ b/program/steps/settings/edit_identity.inc
@@ -21,14 +21,18 @@
$OUTPUT->set_pagetitle(rcube_label('identities'));
-if (($_GET['_iid'] || $_POST['_iid']) && $RCMAIL->action=='edit-identity')
- {
+if (($_GET['_iid'] || $_POST['_iid']) && $RCMAIL->action=='edit-identity') {
$IDENTITY_RECORD = $USER->get_identity(get_input_value('_iid', RCUBE_INPUT_GPC));
if (is_array($IDENTITY_RECORD))
$OUTPUT->set_env('iid', $IDENTITY_RECORD['identity_id']);
- }
-
+}
+else if (!$RCMAIL->config->get('multiple_identities', true)) {
+ $OUTPUT->show_message('opnotpermitted', 'error');
+ // go to identities page
+ rcmail_overwrite_action('identities');
+ return;
+}
$OUTPUT->include_script('list.js');
@@ -136,6 +140,8 @@ function rcube_identity_form($attrib)
$OUTPUT->add_handler('identityform', 'rcube_identity_form');
+$OUTPUT->set_pagetitle(rcube_label(($RCMAIL->action=='add-identity' ? 'newidentity' : 'edititem')));
+
if ($RCMAIL->action=='add-identity' && $OUTPUT->template_exists('addidentity'))
$OUTPUT->send('addidentity');