Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-102826

Unable to retrieve users who belongs to a Role list using the search methods from UserService API

    Details

      Description

      Steps to reproduce:

      1. Create two Roles
      2. Assign them to some users
      3. Call the 
        UserLocalService.search(
        	long companyId, String keywords, int status,
        	LinkedHashMap<String, Object> params, int start, int end,
        		OrderByComparator<User> obc)

        method passing the ids from the created roles into the params map parameter with the "userRoles" key. 

        // role1 and role2 were previously created before this point
        LinkedHashMap<String, Object> params = new LinkedHashMap<>(1);
        
        params.put("usersRoles", new Long[] {role1.getRoleId(), role2.getRoleId()});
        

      Actual result:
      No users are retrieved

      Expected result:
      Users who belongs to these roles are retrieved

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sharry.shi Sharry Shi
                Reporter:
                rafael.praxedes Rafael Praxedes
                Participants of an Issue:
                Recent user:
                Sharry Shi
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  42 weeks, 5 days ago

                  Packages

                  Version Package
                  Master