[imp] Force username to lowercase patch
Alain Williams
addw at phcomp.co.uk
Tue Oct 12 11:16:06 PDT 2004
Summary:
Config option to force a username to lower case on the IMP login page.
Motivation:
A mail delivery system is usually case insensitive on the local part. Users can be
used to seeing it in mixed case (eg Alain.Williams). If the user loggs in with
a mixed case name problems can result (eg case insensitive ldap authentication and
cyrus with the autocreate patch - resulting in the creation of two mail boxes for
the user: one entirely in lower case (mail delivered) and one in mixed case (as the
user logged in). This results in confusion.
This Patch:
Creates a config variable $conf['user']['force_lowercase_username'] which, if true,
generates some javascript on the login page that forces the username to lower case.
It might be nice if the variable was also looked at, server side, to force to lower case;
however as it is it fixed the problems that I (and most people) would have.
Code Copyright:
I hereby release the copyright for this in whatever way Chuck sees fit.
This patch is entirely my own work.
*** ./templates/login/login.inc 2004-10-12 18:55:58.000000000 +0100
--- ./templates/login/login.inc.bak 2004-10-12 18:58:06.000000000 +0100
***************
*** 22,29 ****
document.implogin.pass.focus();
return false;
} else {
- <?php if($conf['user']['force_lowercase_username']) {
- ?> document.implogin.imapuser.value = document.implogin.imapuser.value.toLowerCase(); <?php } ?>
return true;
}
}
--- 22,27 ----
*** config/conf.php 2004-10-12 18:53:28.000000000 +0100
--- config/conf.php.bak 2004-09-10 17:43:58.000000000 +0100
***************
*** 80,88 ****
// the folder defined in their preferences.
$conf['user']['select_sentmail_folder'] = false;
- // If this is true the login username will be forced to lowercase on entry.
- $conf['user']['force_lowercase_username'] = true;
-
/**
** Mail Server Settings
--- 80,85 ----
--
Alain Williams
#include <std_disclaimer.h>
More information about the imp
mailing list