summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcmail_template.inc
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-12-10 15:27:19 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-12-10 15:27:19 +0000
commit7a790a51bb6acd65b193660367c8af3629256907 (patch)
tree46a1289f5e2cd9b32906f1ab037c676a829f6e9e /roundcubemail/program/include/rcmail_template.inc
parent291aa89005cb17ccbc05a95e6f0e7651230836ed (diff)
New class rcube_user + send message disposition notification
git-svn-id: https://svn.roundcube.net/trunk@938 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcmail_template.inc')
-rw-r--r--roundcubemail/program/include/rcmail_template.inc18
1 files changed, 3 insertions, 15 deletions
diff --git a/roundcubemail/program/include/rcmail_template.inc b/roundcubemail/program/include/rcmail_template.inc
index 558bd4bf6..cc5a58ac1 100644
--- a/roundcubemail/program/include/rcmail_template.inc
+++ b/roundcubemail/program/include/rcmail_template.inc
@@ -761,27 +761,15 @@ function rcmail_message_container($attrib)
*/
function rcmail_current_username($attrib)
{
- global $DB;
+ global $USER;
static $s_username;
// alread fetched
if (!empty($s_username))
return $s_username;
- // get e-mail address form default identity
- $sql_result = $DB->query(
- "SELECT email AS mailto
- FROM ".get_table_name('identities')."
- WHERE user_id=?
- AND standard=1
- AND del<>1",
- $_SESSION['user_id']);
-
- if ($DB->num_rows($sql_result))
- {
- $sql_arr = $DB->fetch_assoc($sql_result);
- $s_username = $sql_arr['mailto'];
- }
+ if ($sql_arr = $USER->get_identity())
+ $s_username = $sql_arr['email'];
else if (strstr($_SESSION['username'], '@'))
$s_username = $_SESSION['username'];
else