1212
1313use InvalidArgumentException ;
1414use OC \Authentication \Token \RemoteWipe ;
15- use OC \Group \DisplayNameCache as GroupDisplayNameCache ;
1615use OC \Group \Group ;
1716use OC \KnownUser \KnownUserService ;
1817use OC \User \Backend ;
5756/**
5857 * @psalm-import-type Provisioning_APIGroupDetails from ResponseDefinitions
5958 * @psalm-import-type Provisioning_APIUserDetails from ResponseDefinitions
60- * @psalm-import-type Provisioning_APIUserDetailsGroupDisplayname from ResponseDefinitions
6159 */
6260class UsersController extends AUserDataOCSController {
6361
@@ -83,7 +81,6 @@ public function __construct(
8381 private IEventDispatcher $ eventDispatcher ,
8482 private IPhoneNumberUtil $ phoneNumberUtil ,
8583 private IAppManager $ appManager ,
86- GroupDisplayNameCache $ groupDisplayNameCache ,
8784 ) {
8885 parent ::__construct (
8986 $ appName ,
@@ -96,7 +93,6 @@ public function __construct(
9693 $ subAdminManager ,
9794 $ l10nFactory ,
9895 $ rootFolder ,
99- $ groupDisplayNameCache ,
10096 );
10197
10298 $ this ->l10n = $ l10nFactory ->get ($ appName );
@@ -150,7 +146,7 @@ public function getUsers(string $search = '', ?int $limit = null, int $offset =
150146 * @param string $search Text to search for
151147 * @param int|null $limit Limit the amount of groups returned
152148 * @param int $offset Offset for searching for groups
153- * @return DataResponse<Http::STATUS_OK, array{users: array<string, Provisioning_APIUserDetails|array{id: string}>, groups: list<Provisioning_APIUserDetailsGroupDisplayname> }, array{}>
149+ * @return DataResponse<Http::STATUS_OK, array{users: array<string, Provisioning_APIUserDetails|array{id: string}>}, array{}>
154150 *
155151 * 200: Users details returned
156152 */
@@ -202,8 +198,7 @@ public function getUsersDetails(string $search = '', ?int $limit = null, int $of
202198 }
203199
204200 return new DataResponse ([
205- 'users ' => $ usersDetails ,
206- 'groups ' => $ this ->findGroupsWithDisplayname ($ usersDetails ),
201+ 'users ' => $ usersDetails
207202 ]);
208203 }
209204
0 commit comments