forked from extern/egroupware
fixed forwarding of authentication (ldap or ads) homedirectory attribute to egw_info and vfs
This commit is contained in:
parent
8ab9b0d2f2
commit
f6fe40f2d9
@ -88,7 +88,7 @@ class auth_ads implements auth_backend
|
||||
$GLOBALS['auto_create_acct'] = array();
|
||||
if (isset($allValues[0]['homedirectory']))
|
||||
{
|
||||
$GLOBALS['auto_create_acct']['homedirectory'] = $allValues[0]['homedirectory'];
|
||||
$GLOBALS['auto_create_acct']['homedirectory'] = $allValues[0]['homedirectory'][0];
|
||||
}
|
||||
if ($GLOBALS['egw_info']['server']['auto_create_acct'])
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ class auth_ldap implements auth_backend
|
||||
$GLOBALS['auto_create_acct'] = array();
|
||||
if (isset($allValues[0]['homedirectory']))
|
||||
{
|
||||
$GLOBALS['auto_create_acct']['homedirectory'] = $allValues[0]['homedirectory'];
|
||||
$GLOBALS['auto_create_acct']['homedirectory'] = $allValues[0]['homedirectory'][0];
|
||||
}
|
||||
if (!($id = $GLOBALS['egw']->accounts->name2id($username,'account_lid','u')))
|
||||
{
|
||||
|
@ -1430,9 +1430,19 @@ class egw_session
|
||||
|
||||
$this->user = $GLOBALS['egw']->accounts->read_repository();
|
||||
// set homedirectory from auth_ldap or auth_ads, to be able to use it in vfs
|
||||
if (!isset($this->user['homedirectory']) && isset($GLOBALS['auto_create_acct']['homedirectory']))
|
||||
if (!isset($this->user['homedirectory']))
|
||||
{
|
||||
$this->user['homedirectory'] = $GLOBALS['auto_create_acct']['homedirectory'];
|
||||
// authentication happens in login.php, which does NOT yet create egw-object in session
|
||||
// --> need to store homedirectory in session
|
||||
if(isset($GLOBALS['auto_create_acct']['homedirectory']))
|
||||
{
|
||||
egw_cache::setSession(__CLASS__, 'homedirectory',
|
||||
$this->user['homedirectory'] = $GLOBALS['auto_create_acct']['homedirectory']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->user['homedirectory'] = egw_cache::getSession(__CLASS__, 'homedirectory');
|
||||
}
|
||||
}
|
||||
$this->user['acl'] = $GLOBALS['egw']->acl->read_repository();
|
||||
$this->user['preferences'] = $GLOBALS['egw']->preferences->read_repository();
|
||||
|
Loading…
Reference in New Issue
Block a user