Home » Authentication » LiveUser » Bug #857
Bug in addUser in LiveUser_Admin_Auth_Container_MDB
Details
| Submitted | 2004-02-26 01:15 UTC |
|---|---|
| From | simon dot hamilton at ntlworld dot com |
| Assigned | lsmith |
| Status | Closed |
| Package | LiveUser |
| PHP Version | 4.3.3 |
| OS | ANY |
| Roadmaps | (Not assigned) |
Comments
[2004-02-26 01:15 UTC] simon dot hamilton at ntlworld dot com
Description:
------------
As per my email to the list...
The ['name'] key was missing from the vars used in the INSERT...perhaps due to some copy/paste^h^h^h^h^h^h^h^h^h^hporting from the DB container :).
Here's the diff to fix it:
--- MDB.php.new 2004-02-26 00:08:59.656250000 +0000
+++ MDB.php 2004-02-26 00:08:25.578125000 +0000
@@ -223,17 +223,17 @@
$col = $val = '';
if (isset($this->authTableCols['is_active'])) {
- $col[] = $this->authTableCols['is_active']['name'];
+ $col[] = $this->authTableCols['is_active'];
$val[] = $this->dbc->getValue('boolean', $active);
}
if (isset($this->authTableCols['owner_user_id'])) {
- $col[] = $this->authTableCols['owner_user_id']['name'];
+ $col[] = $this->authTableCols['owner_user_id'];
$val[] = $this->dbc->getValue('integer', $owner_user_id);
}
if (isset($this->authTableCols['owner_group_id'])) {
- $col[] = $this->authTableCols['owner_group_id']['name'];
+ $col[] = $this->authTableCols['owner_group_id'];
$val[] = $this->dbc->getValue('integer', $owner_group_id);
}
Hope this helps!
Reproduce code:
---------------
n/a
Expected result:
----------------
An Auth user id.
Actual result:
--------------
a SQL error causing arrays to get added to the query.
[2004-02-26 01:17 UTC] simon dot hamilton at ntlworld dot com
lol....I did it again.
Here's the patch the right way around.
--- MDB.php 2004-02-26 00:08:25.578125000 +0000
+++ MDB.php.new 2004-02-26 00:08:59.656250000 +0000
@@ -223,17 +223,17 @@
$col = $val = '';
if (isset($this->authTableCols['is_active'])) {
- $col[] = $this->authTableCols['is_active'];
+ $col[] = $this->authTableCols['is_active']['name'];
$val[] = $this->dbc->getValue('boolean', $active);
}
if (isset($this->authTableCols['owner_user_id'])) {
- $col[] = $this->authTableCols['owner_user_id'];
+ $col[] = $this->authTableCols['owner_user_id']['name'];
$val[] = $this->dbc->getValue('integer', $owner_user_id);
}
if (isset($this->authTableCols['owner_group_id'])) {
- $col[] = $this->authTableCols['owner_group_id'];
+ $col[] = $this->authTableCols['owner_group_id']['name'];
$val[] = $this->dbc->getValue('integer', $owner_group_id);
}
--
Simon H