diff options
author | Vinicius Cubas Brand <viniciuscb@gmail.com> | 2019-03-04 14:09:27 -0300 |
---|---|---|
committer | Backportbot <backportbot-noreply@rullzer.com> | 2019-03-21 10:33:03 +0000 |
commit | 7d6a7ab351431407a5194322e6e80cac2d44ce19 (patch) | |
tree | fa35098c8a337ba21b2e5784f4e63a4188276864 /apps | |
parent | 20b0817e5c1761b8a2d8f8bc7cf0a167f58029d1 (diff) | |
download | nextcloud-server-7d6a7ab351431407a5194322e6e80cac2d44ce19.tar.gz nextcloud-server-7d6a7ab351431407a5194322e6e80cac2d44ce19.zip |
Cache cleaning when subadmin adds user to group
This commit fix an error happening when the subadmin tries to create an
user, adding him/her to the group s/he is subadmin of, using a LDAP
User/Group plugin.
This just forces the cache to be reset after an user is added to a
group.
Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/lib/Group_LDAP.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php index 1658807c0dd..cd4bd18cb44 100644 --- a/apps/user_ldap/lib/Group_LDAP.php +++ b/apps/user_ldap/lib/Group_LDAP.php @@ -1171,6 +1171,7 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD if ($this->groupPluginManager->implementsActions(GroupInterface::ADD_TO_GROUP)) { if ($ret = $this->groupPluginManager->addToGroup($uid, $gid)) { $this->access->connection->clearCache(); + unset($this->cachedGroupMembers[$gid]); } return $ret; } @@ -1188,6 +1189,7 @@ class Group_LDAP extends BackendUtility implements \OCP\GroupInterface, IGroupLD if ($this->groupPluginManager->implementsActions(GroupInterface::REMOVE_FROM_GROUP)) { if ($ret = $this->groupPluginManager->removeFromGroup($uid, $gid)) { $this->access->connection->clearCache(); + unset($this->cachedGroupMembers[$gid]); } return $ret; } |