?
Related to # 5405
avatar subtext
subtext
3 Dec 2014

Steps to reproduce the issue

Log in to the administrator interface of a Joomla 3.x install and go to the Users section. Click on the search tools and set -Active- to "Activated"

Expected result

One should see a list of only activated users.

Actual result

Both activated and inactive users are displayed.

System information (as much as possible)

PHP Built On Linux brucefishkinscholarshipfund.com 2.6.32-042stab092.3 #1 SMP Sun Jul 20 13:27:24 MSK 2014 x86_64
Database Version 5.5.40
Database Collation utf8_general_ci
PHP Version 5.4.33
Web Server Apache/2.2.15 (CentOS)
WebServer to PHP Interface apache2handler
Joomla! Version Joomla! 3.3.6 Stable [ Ember ] 01-October-2014 02:00 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/600.1.25 (KHTML, like Gecko) Version/8.0 Safari/600.1.25

Additional comments

This issue appears to be related to commit c5ede43 which was a previous fix for a slightly different problem. Here the SQL query was modified to include both an empty string and zero. However, the zero here is presented as an integer not a string zero and MySQL is returning rows that clearly have a non empty non-zero field for this query. This is a quick fix the query only needs to be changed to:

$query->where('a.activation IN (' . $db->quote('') . ', ' . $db->quote('0') . ')');

Quoting the zero so that it is treated like a string solves the problem because the activation field is a VARCHAR.

avatar subtext subtext - open - 3 Dec 2014
avatar vdespa vdespa - change - 3 Dec 2014
Category Administration Administration Components
avatar vdespa vdespa - change - 3 Dec 2014
Build Joomla! 3.3.6 Stable [ Ember ] 3.3.6
avatar Kubik-Rubik
Kubik-Rubik - comment - 7 Dec 2014

Thank you for reporting this issue. I can confirm it!

@subtext Could you please provide a PR (pull request) with the fix? Thanks!

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5307.

avatar Kubik-Rubik Kubik-Rubik - change - 7 Dec 2014
Status New Confirmed
avatar alikon
alikon - comment - 16 Dec 2014

This can be closed as per #5405


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5307.
avatar brianteeman brianteeman - change - 16 Dec 2014
Status Confirmed Closed
Rel_Number 5405
Relation Type Related to
avatar zero-24 zero-24 - close - 16 Dec 2014
avatar brianteeman brianteeman - change - 16 Dec 2014
Closed_Date 0000-00-00 00:00:00 2014-12-16 13:17:31
avatar brianteeman brianteeman - close - 16 Dec 2014
avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment