mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:56 +01:00
if the username contains non-ascii chars, try email address, as Dovecot does NOT deal with non-ascii usernames
This commit is contained in:
parent
802c4973a0
commit
d95305815a
@ -298,6 +298,13 @@ class Credentials
|
|||||||
*/
|
*/
|
||||||
public static function from_session(array $data, $set_identity=true)
|
public static function from_session(array $data, $set_identity=true)
|
||||||
{
|
{
|
||||||
|
// if the username contains non-ascii chars, try email address, as Dovecot does NOT deal with non-ascii usernames
|
||||||
|
if ($data['acc_imap_type'] === Api\Mail\Imap\Dovecot::class &&
|
||||||
|
in_array($data['acc_imap_logintype'], ['standard', 'vmailmgr']) &&
|
||||||
|
preg_match('/[^\x20-\x7e]/', $GLOBALS['egw_info']['user']['account_lid']))
|
||||||
|
{
|
||||||
|
$data['acc_imap_logintype'] = 'email';
|
||||||
|
}
|
||||||
switch($data['acc_imap_logintype'])
|
switch($data['acc_imap_logintype'])
|
||||||
{
|
{
|
||||||
case 'standard':
|
case 'standard':
|
||||||
|
Loading…
Reference in New Issue
Block a user