PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Authentication » LiveUser » Bug #2525

LiveUser_Admin_Auth_Container_DB::getUsers() doesn't work with simple filters

Details

Submitted2004-10-14 09:27 UTC
Fromscragz at hotmail dot com
StatusBogus
PackageLiveUser
PHP VersionIrrelevant
OSIrrelevant
Roadmaps(Not assigned)

Comments

[2004-10-14 09:27 UTC] scragz at hotmail dot com

Description:
------------
The "documentation" says that filters can either be complex or simple, but the method doesn't work with simple ones (DB error). I submitted a patch for this, but it was lumped in with a bunch of other ones and must have got missed. I'm reporting everything separately from now on.

Reproduce code:
---------------
-foreach ($filters as $f => $v) {
- $cond = ' ' . $v['cond'];
- $where .= ' ' . $v['name'] . $v['op'] . $this->dbc->quoteSmart($v['value']) . $cond;
-}

+foreach ($filters as $f => $v) {
+ if (is_array($v)) {
+ $cond = ' ' . $v['cond'];
+ $where .= ' ' . $v['name'] . $v['op'] . $this->dbc->quoteSmart($v['value']) . $cond;
+ } else {
+ $cond = ' AND';
+ $where .= ' ' . $f . ' = ' . $this->dbc->quoteSmart($v) . $cond;
+ }
+}