I'm bored to always type the prefix in my webmail login form...
Example :
ID : jocatop-christophe
Pass : XXXXXX
ID : jocatop-pierre
Pass : XXXXX
ID : jocatop-robert
...
It's very boring to always type the prefix "jocatop-".
Now, it's better !
This patch is based on the SVN 508.
program/include/main.inc
Before :
function rcmail_login($user, $pass, $host=NULL)
{
global $CONFIG, $IMAP, $DB, $sess_user_lang;
$user_id = NULL;
if (!$host)
$host = $CONFIG['default_host'];
// Validate that selected host is in the list of configured hosts
if (is_array($CONFIG['default_host']))
{
After :
function rcmail_login($user, $pass, $host=NULL)
{
global $CONFIG, $IMAP, $DB, $sess_user_lang;
$user_id = NULL;
if (!empty($CONFIG['login_username_prefix']))
$user = $CONFIG['login_username_prefix'].str_replace ( $CONFIG['login_username_prefix'], "", $user );
if (!$host)
$host = $CONFIG['default_host'];
// Validate that selected host is in the list of configured hosts
if (is_array($CONFIG['default_host']))
{
config/main.inc.php
Simple add these lines :
// Enable prefix use for username in the login form.
$rcmail_config['login_username_prefix'] = ''; //sample : 'jocatop-'
$CONFIG changed to $config
and it is in the program/include/rcmail.php
Good luck