diff options
author | thomascube <thomas@roundcube.net> | 2007-12-10 15:27:19 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2007-12-10 15:27:19 +0000 |
commit | fba1f5ab813f2eb4bedc5d9c4a75e77bbaa90131 (patch) | |
tree | cebde4edb06ac3a87eb2306b0c0125610a1bd5ce /program/include/rcmail_template.inc | |
parent | d39eecad6db1caee97624b80634587d98a75e701 (diff) |
New class rcube_user + send message disposition notification
Diffstat (limited to 'program/include/rcmail_template.inc')
-rw-r--r-- | program/include/rcmail_template.inc | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/program/include/rcmail_template.inc b/program/include/rcmail_template.inc index 558bd4bf6..cc5a58ac1 100644 --- a/program/include/rcmail_template.inc +++ b/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 |