diff options
author | Vinicius Cubas Brand <viniciuscb@gmail.com> | 2019-03-04 14:09:27 -0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2019-03-21 10:20:46 +0100 |
commit | a2c38148e7b7390884e89b8fee252a1914b6ccf9 (patch) | |
tree | b29407b6bd22cabac6da3d51ec68cb0e26129b15 /apps/user_ldap | |
parent | c4dbc428f9677a03b3f873eaba9282cfd227d876 (diff) | |
download | nextcloud-server-a2c38148e7b7390884e89b8fee252a1914b6ccf9.tar.gz nextcloud-server-a2c38148e7b7390884e89b8fee252a1914b6ccf9.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/user_ldap')
-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; } |