roundcubemail/program/include/rcmail_output_html.php
public function current_username($attrib)
    {
        static $username;

        // alread fetched
        if (!empty($username)) {
            return $username;
        }

        // Current username is an e-mail address
        if (strpos($_SESSION['username'], '@')) {
            $username = $_SESSION['username'];
        }
        // get e-mail address from default identity
        else if ($sql_arr = $this->app->user->get_identity()) {
            $username = $sql_arr['email'];
        }
        else {
            $username = $this->app->user->get_username();
        }

        return rcube_utils::idn_to_utf8($username);
    }
public function current_username($attrib)
    {
        static $username;

        // alread fetched
        if (!empty($username)) {
            return $username;
        }

        // Current username is an e-mail address
        if (strpos($_SESSION['username'], '@')) {
            $username = $_SESSION['username'];
        }
        // get e-mail address from default identity
        else if ($sql_arr = $this->app->user->get_identity()) {
            $username = $sql_arr['email'];
        }
        else {
            $username = $this->app->user->get_username();
        }

        return rcube_utils::idn_to_utf8($username);
    }
public function current_username ( $ attrib ) { static $ username ; // alread fetched if ( ! empty ( $ username ) ) { return $ username ; } // Current username is an e-mail address if ( strpos ( $ _SESSION [ 'username' ] , '@' ) ) { $ username = $ _SESSION [ 'username' ] ; } // get e-mail address from default identity else if ( $ sql_arr = $ this -> app -> user -> get_identity ( ) ) { $ username = $ sql_arr [ 'email' ] ; } else { $ username = $ this -> app -> user -> get_username ( ) ; } return rcube_utils :: idn_to_utf8 ( $ username ) ; }
GUI object 'username'
Showing IMAP username of the current session

@param array $attrib Named tag parameters (currently not used)

@return string HTML code for the gui object
GUI object username Showing IMAP username of the current session