diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2012-10-18 12:14:02 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2012-10-18 12:14:02 +0200 |
commit | 9f0ca2dca669a3f379d8582f128b7cca7056a921 (patch) | |
tree | a425c936d4d6fb5ffb27e5dde5bd468437238b3a /program/include/rcmail.php | |
parent | 7ea292410644af4b6eaa772a8f71855783ade0ae (diff) | |
parent | 22c67d0ec28f4c9488d26aa35151392a18c74c45 (diff) |
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r-- | program/include/rcmail.php | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 3b6c6cf15..7a49095f7 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -452,6 +452,10 @@ class rcmail extends rcube $username .= '@'.rcube_utils::parse_host($config['username_domain'], $host); } + if (!isset($config['login_lc'])) { + $config['login_lc'] = 2; // default + } + // Convert username to lowercase. If storage backend // is case-insensitive we need to store always the same username (#1487113) if ($config['login_lc']) { @@ -483,21 +487,7 @@ class rcmail extends rcube $storage = $this->get_storage(); // try to log in - if (!($login = $storage->connect($host, $username, $pass, $port, $ssl))) { - // try with lowercase - $username_lc = mb_strtolower($username); - if ($username_lc != $username) { - // try to find user record again -> overwrite username - if (!$user && ($user = rcube_user::query($username_lc, $host))) - $username_lc = $user->data['username']; - - if ($login = $storage->connect($host, $username_lc, $pass, $port, $ssl)) - $username = $username_lc; - } - } - - // exit if login failed - if (!$login) { + if (!$storage->connect($host, $username, $pass, $port, $ssl)) { return false; } @@ -2117,10 +2107,9 @@ class rcmail extends rcube } else { $this->set_storage_prop(); - return $storage->is_connected(); } } - return false; + return $storage->is_connected(); } } |