summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-05-27 14:36:59 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-05-27 14:36:59 +0000
commitdf0ba7991d16fce09ae11f7d4dd430fa419e760d (patch)
treeb38dec502c026743470d5e312093f7cd11563d37 /roundcubemail/program
parent2bcbb24d7a31665b3749060b23f7b36ca43a556d (diff)
Code cleanup: use common objects and methods
git-svn-id: https://svn.roundcube.net/trunk@1433 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rwxr-xr-xroundcubemail/program/include/rcube_template.php10
1 files changed, 3 insertions, 7 deletions
diff --git a/roundcubemail/program/include/rcube_template.php b/roundcubemail/program/include/rcube_template.php
index df6c3ccfc..d519f7533 100755
--- a/roundcubemail/program/include/rcube_template.php
+++ b/roundcubemail/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;