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

UserLocalServiceUtil searchCount does not support screenName filter correctly

    Details

      Description

      The file portal-impl\src\com\liferay\portal\service\persistence\UserFinderImpl.java has an error in the implementation of the method:

      public int countByC_FN_MN_LN_SN_EA_S(
      long companyId, String firstName, String middleName,
      String lastName, String screenName, String emailAddress,
      int status, LinkedHashMap<String, Object> params,
      boolean andOperator)
      throws SystemException

      The error is that on line 197:

      String[] screenNames = CustomSQLUtil.keywords(lastName);

      The value for screenNames is incorrectly taken from the input parameter lastName; it should be taken from the input parameter screenName.

      This causes calling code to typically be returned incorrect results from this method.

      (Note: the other variant of countByC_FN_MN_LN_SN_EA_S that takes array parameters does not suffer from this problem).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michael.saechang Michael Saechang
              Reporter:
              wabrit Alan Boshier (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                9 years, 22 weeks, 2 days ago

                  Packages

                  Version Package
                  6.0.X EE
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  6.2.0 CE M2