"fix for bug #2112: fix maybe wrong case in username on login

makes problems eg. in filemanager (name of homedir)"
This commit is contained in:
Ralf Becker 2009-07-18 13:14:13 +00:00
parent 89d8486583
commit d679a00d1d

View File

@ -481,7 +481,6 @@ class egw_session
} }
return false; return false;
} }
if (!$this->account_id && $GLOBALS['egw_info']['server']['auto_create_acct']) if (!$this->account_id && $GLOBALS['egw_info']['server']['auto_create_acct'])
{ {
if ($GLOBALS['egw_info']['server']['auto_create_acct'] == 'lowercase') if ($GLOBALS['egw_info']['server']['auto_create_acct'] == 'lowercase')
@ -490,6 +489,12 @@ class egw_session
} }
$this->account_id = $GLOBALS['egw']->accounts->auto_add($this->account_lid, $passwd); $this->account_id = $GLOBALS['egw']->accounts->auto_add($this->account_lid, $passwd);
} }
// fix maybe wrong case in username, it makes problems eg. in filemanager (name of homedir)
if ($this->account_lid != ($lid = $GLOBALS['egw']->accounts->id2name($this->account_id)))
{
$this->account_lid = $lid;
$this->login = $lid.substr($this->login,strlen($lid));
}
$GLOBALS['egw_info']['user']['account_id'] = $this->account_id; $GLOBALS['egw_info']['user']['account_id'] = $this->account_id;
$GLOBALS['egw']->accounts->accounts($this->account_id); $GLOBALS['egw']->accounts->accounts($this->account_id);