Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-39185

UserDirectoryService.searchUsers() doesn't limit the returned set

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.x, 2.7.x
    • Fix Version/s: 2.6.x, 2.7.x, 2.8.x
    • Component/s: Kernel
    • Labels:
      None
    • Previous Issue Keys:
      SAK-14268, KNL-380

      Description

      The searchUsers() method of UserDirectoryService JavaDoc has this:

      List searchUsers(String criteria,
      int first,
      int last)
      Search all the users that match this criteria in id or email, first or last name, returning a subset of records within the record range given (sorted by sort name).
      Parameters:
      criteria - The search criteria.
      first - The first record position to return.
      last - The last record position to return.
      Returns:
      A list (User) of all the aliases matching the criteria, within the record range given (sorted by sort name).

      However the returned List is not limited to the range specified.

      ie given this:
      List users = UserDirectoryService.searchUsers("test", 1, 1);

      then assuming test matches something, I should only get one record back, but if it matches more than one I get multiples.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  k1team KERNEL TEAM (Inactive)
                  Reporter:
                  steve.swinsburg Steve Swinsburg
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration