From f3aefcca77520111e985ae545f99938408030b4f Mon Sep 17 00:00:00 2001 From: harshanl Date: Tue, 23 Aug 2016 17:57:08 +0530 Subject: [PATCH] Fixed EMM-1450 --- .../mgt/jaxrs/service/impl/UserManagementServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java index 0be452585f9..6df497f8c1a 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java @@ -268,7 +268,7 @@ public class UserManagementServiceImpl implements UserManagementService { RequestValidationUtil.validatePaginationParameters(offset, limit); List userList, offsetList; - String appliedFilter = ((filter == null) || filter.isEmpty() ? "*" : filter); + String appliedFilter = ((filter == null) || filter.isEmpty() ? "*" : filter + "*"); // to get whole set of users, appliedLimit is set to -1 // by default, this whole set is limited to 100 - MaxUserNameListLength of user-mgt.xml int appliedLimit = -1; @@ -277,7 +277,7 @@ public class UserManagementServiceImpl implements UserManagementService { UserStoreManager userStoreManager = DeviceMgtAPIUtils.getUserStoreManager(); //As the listUsers function accepts limit only to accommodate offset we are passing offset + limit - String[] users = userStoreManager.listUsers(appliedFilter + "*", appliedLimit); + String[] users = userStoreManager.listUsers(appliedFilter, appliedLimit); userList = new ArrayList<>(users.length); BasicUserInfo user; for (String username : users) {