Merge pull request #17723 from owncloud/fix-17631
fix runtime caching in ldap's user manager, fixes #17631
This commit is contained in:
commit
f573659b3a
|
@ -110,8 +110,8 @@ class Manager {
|
|||
$user = new User($uid, $dn, $this->access, $this->ocConfig,
|
||||
$this->ocFilesystem, clone $this->image, $this->ocLog,
|
||||
$this->avatarManager);
|
||||
$users['byDN'][$dn] = $user;
|
||||
$users['byUid'][$uid] = $user;
|
||||
$this->users['byDN'][$dn] = $user;
|
||||
$this->users['byUid'][$uid] = $user;
|
||||
return $user;
|
||||
}
|
||||
|
||||
|
|
|
@ -64,6 +64,10 @@ class Test_User_Manager extends \Test\TestCase {
|
|||
$manager->setLdapAccess($access);
|
||||
$user = $manager->get($inputDN);
|
||||
|
||||
// Now we fetch the user again. If this leads to a failing test,
|
||||
// runtime caching the manager is broken.
|
||||
$user = $manager->get($inputDN);
|
||||
|
||||
$this->assertInstanceOf('\OCA\user_ldap\lib\user\User', $user);
|
||||
}
|
||||
|
||||
|
@ -173,6 +177,10 @@ class Test_User_Manager extends \Test\TestCase {
|
|||
$manager->setLdapAccess($access);
|
||||
$user = $manager->get($uid);
|
||||
|
||||
// Now we fetch the user again. If this leads to a failing test,
|
||||
// runtime caching the manager is broken.
|
||||
$user = $manager->get($uid);
|
||||
|
||||
$this->assertInstanceOf('\OCA\user_ldap\lib\user\User', $user);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue