Home » Authentication » LiveUser » Bug #296
Feat.Req: Flexible field list for auth table
Details
| Submitted | 2003-11-25 15:28 UTC |
|---|---|
| From | liveuser at bago dot org |
| Assigned | arnaud |
| Status | Closed |
| Package | LiveUser |
| PHP Version | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2003-11-25 15:28 UTC] liveuser at bago dot org
Description:
------------
the Admin classes are not flexible as the LU base classes:
Why not to change the getAllUsers so to have estensible select given the authTableCols?
function getAllUsers()
{
if (!$this->init_ok) {
return false;
}
$fields = array();
foreach ($this->authTableCols AS $key => $value) {
$fields[] = $value . ' AS ' . $key;
}
// First: Get all data from auth table.
$query = '
SELECT
'. implode(',', $fields).'
FROM
' . $this->authTable;
Instead of the current one:
function getAllUsers()
{
if (!$this->init_ok) {
return false;
}
// First: Get all data from auth table.
$query = '
SELECT
' . $this->authTableCols['user_id'] . ' AS auth_user_id,
' . $this->authTableCols['handle'] . ' AS handle,
' . $this->authTableCols['passwd'] . ' AS passwd,
' . $this->authTableCols['lastlogin'] . ' AS lastlogin,
' . $this->authTableCols['is_active'] . ' AS is_active
FROM
' . $this->authTable;