View Issue Details

IDProjectCategoryView StatusLast Update
0019797mantisbtadministrationpublic2015-09-06 17:37
Reporteratrol Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.0-beta.2 
Target Version1.3.0-beta.3Fixed in Version1.3.0-beta.3 
Summary0019797: No users listed when using option "Hide inactive" option of manage user page
Description

Goto page manage_user_page.php
Enable checkbox "Hide inactive"

Result; No users are listed

This is caused by the wrong where condition "AND enabled = 1433192009"

manage_user_page.php:222 db_query() SELECT count(*) as user_count FROM mantis_user_table WHERE (1 = 1) AND (1 < last_visit + 604800) AND enabled = 1433192009

TagsNo tags attached.

Activities

dregad

dregad

2015-06-02 04:51

developer   ~0050860

Regression introduced by commit 0a33bdfde4ed437e26b6d6d91423abf290b00041.

The refactoring of db_helper_compare_days introduced usage of a new query parameter; the parameters list is not built in the order expected by the generated SQL query, causing the boolean value for "enabled" to be used as a date, and the given timestamp is compared with "enabled" flag.

Related Changesets

MantisBT: master 85f94206

2015-06-02 00:51

dregad


Details Diff
Empty user list when "Hide inactive" option is checked

The refactoring of db_helper_compare_days() function in commit
0a33bdfde4ed437e26b6d6d91423abf290b00041 introduced usage of a new query
parameter; the parameters list is not built in the order expected by the
generated SQL query, causing the boolean value for "enabled" to be used
as a date, and the given timestamp is compared with "enabled" flag.

The SQL now applies the "disabled condition" where clause before the
date filter, so the order of parameters matches.

Also removed useless db_now() parameter assignment at line 249, the
target date parameter has already been added at line 219.

Fixes 0019797
Affected Issues
0019797
mod - manage_user_page.php Diff File