summaryrefslogtreecommitdiff
path: root/program/steps/settings/func.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-10-24 07:57:21 +0000
committeralecpl <alec@alec.pl>2008-10-24 07:57:21 +0000
commitec01712a998b35d48be3daaf272779fdbc63cd74 (patch)
tree397846eede8b3d52e55dcc33563b0bc47b0a2913 /program/steps/settings/func.inc
parentd1a8d0f4c21136c9adc7efa02e3a37772bea222f (diff)
- Added option 'identities_level', removed 'multiple_identities'
- Allow deleting identities when multiple_identities=false (#1485435)
Diffstat (limited to 'program/steps/settings/func.inc')
-rw-r--r--program/steps/settings/func.inc19
1 files changed, 18 insertions, 1 deletions
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 1b28d3b17..6f378fd0e 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -401,7 +401,24 @@ function rcmail_get_skins()
return $skins;
}
-$OUTPUT->set_env('multiple_identities', $RCMAIL->config->get('multiple_identities', true));
+
+function rcmail_get_email()
+ {
+ global $RCMAIL;
+
+ if (strpos($RCMAIL->user->data['username'], '@'))
+ return $RCMAIL->user->data['username'];
+ else {
+ if ($RCMAIL->config->get('virtuser_file'))
+ $user_email = rcube_user::user2email($RCMAIL->user->data['username']);
+
+ if ($user_email == '')
+ $user_email = sprintf('%s@%s', $RCMAIL->user->data['username'],
+ $RCMAIL->config->mail_domain($_SESSION['imap_host']));
+
+ return $user_email;
+ }
+ }
// register UI objects
$OUTPUT->add_handlers(array(