From 044d5a8d01d7a393ebacf22c66bdd0cef67344eb Mon Sep 17 00:00:00 2001 From: Daniel Calviño Sánchez Date: Tue, 13 Mar 2018 07:29:12 +0100 Subject: Inject public IGroupManager instead of private GroupManager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The public "IGroupManager" service returned by the dependency injection system is automatically initialized with an "OC\Group\Database" backend. However, no backend is automatically set in private "GroupManager" instances. Therefore, a private "GroupManager" instance does not work as expected when initialized through the dependency injection system. Due to that this commit reverts a previous change in which the public "IGroupManager" was replaced by a private "GroupManager" instance. That change was needed when strict types were set, as "getSubAdmin()" is not part of "IGroupManager" API, so the type had to be changed to "GroupManager". Until a better solution is found strict types are disabled again to be able to inject "IGroupManager" and also use "getSubAdmin()". Signed-off-by: Daniel Calviño Sánchez --- settings/Controller/UsersController.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'settings/Controller/UsersController.php') diff --git a/settings/Controller/UsersController.php b/settings/Controller/UsersController.php index df89c2ec1a7..956403f143c 100644 --- a/settings/Controller/UsersController.php +++ b/settings/Controller/UsersController.php @@ -1,5 +1,7 @@