diff options
author | thomascube <thomas@roundcube.net> | 2008-05-27 14:36:59 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2008-05-27 14:36:59 +0000 |
commit | 7e9cecda9804e6137566795d67d6b6b5f95dd343 (patch) | |
tree | 624604c6640b20c74f05c36313ea6fbe86944ba1 | |
parent | 9734bec37ca2274bb9b6f916ef5bf640e6bd1510 (diff) |
Code cleanup: use common objects and methods
-rwxr-xr-x | program/include/rcube_template.php | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php index df6c3ccfc..d519f7533 100755 --- a/program/include/rcube_template.php +++ b/program/include/rcube_template.php @@ -829,7 +829,6 @@ class rcube_template extends rcube_html_page */ public function current_username($attrib) { - global $USER; static $username; // alread fetched @@ -838,14 +837,11 @@ class rcube_template extends rcube_html_page } // get e-mail address form default identity - if ($sql_arr = $USER->get_identity()) { - $s_username = $sql_arr['email']; - } - else if (strstr($_SESSION['username'], '@')) { - $username = $_SESSION['username']; + if ($sql_arr = $this->app->user->get_identity()) { + $username = $sql_arr['email']; } else { - $username = $_SESSION['username'].'@'.$_SESSION['imap_host']; + $username = $this->app->user->get_username(); } return $username; |