From 789e5988aaebb78d368b137b98169ec1e616159c Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 26 Nov 2012 10:08:40 +0100 Subject: Clarify rcube::get_user_name() usage, add rcube::get_user_email() --- program/steps/settings/edit_identity.inc | 5 +++-- program/steps/settings/save_identity.inc | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'program/steps/settings') diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc index f82169017..39076f408 100644 --- a/program/steps/settings/edit_identity.inc +++ b/program/steps/settings/edit_identity.inc @@ -42,8 +42,9 @@ else { rcmail_overwrite_action('identities'); return; } - else if (IDENTITIES_LEVEL == 1) - $IDENTITY_RECORD['email'] = $RCMAIL->user->get_username(); + else if (IDENTITIES_LEVEL == 1) { + $IDENTITY_RECORD['email'] = $RCMAIL->get_user_email(); + } } diff --git a/program/steps/settings/save_identity.inc b/program/steps/settings/save_identity.inc index 8515c44f1..d579ee61f 100644 --- a/program/steps/settings/save_identity.inc +++ b/program/steps/settings/save_identity.inc @@ -107,8 +107,9 @@ if ($_POST['_iid']) // insert a new identity record else if (IDENTITIES_LEVEL < 2) { - if (IDENTITIES_LEVEL == 1) - $save_data['email'] = $RCMAIL->user->get_username(); + if (IDENTITIES_LEVEL == 1) { + $save_data['email'] = $RCMAIL->get_user_email(); + } $plugin = $RCMAIL->plugins->exec_hook('identity_create', array('record' => $save_data)); $save_data = $plugin['record']; -- cgit v1.2.3