UserLocalServiceUtil searchCount does not support screenName filter correctly

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).

Activity

Show:

Cynthia Wilburn March 12, 2012 at 1:59 PM

Reopening to add 6.1.1 CE GA2. Close as Fixed.

Michael Saechang January 25, 2012 at 5:16 PM

Committed on:
6.1.x GIT ID: a6828a026a279b9b1d52d75d17eca30841b00faf.
6.2.x GIT ID: f24daeb29c3a51cb7be8a2d4ef5b0dff7ab45503.

Shinn Lok January 17, 2012 at 10:12 AM

Thanks for the report. This will be fixed in trunk.

Fixed

Details

Assignee

Reporter

Branch Version/s

6.1.x
6.0.x

Backported to Branch

Committed

Git Pull Request

Components

Affects versions

Priority

Zendesk Support

Created January 17, 2012 at 4:05 AM
Updated June 24, 2023 at 3:40 PM
Resolved November 28, 2012 at 1:12 PM
Loading...