I realize I'm replying to an older thread, but hopefully a few of you will find this useful.
Based on rcmmm's code but with a few tweaks, here's what I came up with.
if ($task == 'login'){
$title = rcube_label(array('name' => 'welcome', 'vars' => array('product' => $this->config['product_name'])));
}
else {
$titleP1 = "";
if (isset($_SESSION['username'])) {
$titleP1 = $_SESSION['username'];
} else {
$titleP1 = "Roundcube";
}
$title = $titleP1 . " - Webmail";
}
return Q($title);
This takes the currently logged in user's name and sets it as the title, adding a "- Webmail", and if no user is logged in, it sets the title to Roundcube - Webmail.
My php skills are fairly limited, so any suggestions for improvement would be appreciated. I think this idea would be something worth adding to the next release.