Hi,
I have written the following patch which will read the full name from /etc/passwd for the login name used to login to roundcube --- if that search doesn't return anything, the original line of code is used instead.
This code works for me on Ubuntu 8.04 LTS, with Virtualmin GPL.
Please note that I also had to set 'virtuser_file' in RC main.inc.php to /etc/postfix/virtual so that logged in users have the correct email address associated with them.
Here's the code that replaces one line in
/program/include/rcube_user.php
// replaced this original code
// $user_name = $user != $user_email ? $user : '';
//
// with call to awk (linux utility for text/pattern manipulation)
// that compares the #1 column of /etc/passwd with $user and returns value of #5 column (full name)
// if no usable return value, the original code is used
// it seems exec() returns 0 even if the search string was not found, so $awk_return_value is not used
// NEW FROM HERE
exec("awk -F: '($1==U){print $5}' U=$user /etc/passwd", $awk_output, $awk_return_value);
if($awk_output[0] <> ''){
$user_name = $awk_output[0];
} else {
$user_name = $user != $user_email ? $user : '';
}
// TO HERE
Hope this works for others, too,
Christian