cvs: pearweb /include pear-database.php
| From: | Martin Jansen | Date: | Mon, 09 Jun 2003 07:27:01 +0000 |
| Subject: | cvs: pearweb /include pear-database.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-10786@lists.php.net to get a copy of this message | ||
mj Mon Jun 9 03:27:01 2003 EDT
Modified files:
/pearweb/include pear-database.php
Log:
* Only list registered users by default.
Index: pearweb/include/pear-database.php
diff -u pearweb/include/pear-database.php:1.122 pearweb/include/pear-database.php:1.123
--- pearweb/include/pear-database.php:1.122 Sun Jun 8 17:56:33 2003
+++ pearweb/include/pear-database.php Mon Jun 9 03:27:00 2003
@@ -17,7 +17,7 @@
| Tomas V.V.Cox <cox@php.net> |
| Martin Jansen <mj@php.net> |
+----------------------------------------------------------------------+
- $Id: pear-database.php,v 1.122 2003/06/08 21:56:33 mj Exp $
+ $Id: pear-database.php,v 1.123 2003/06/09 07:27:00 mj Exp $
*/
require_once 'DB/storage.php';
@@ -1628,10 +1628,15 @@
function listAll()
{
global $dbh;
- return $dbh->getAll("SELECT * FROM users ORDER BY handle",
- null, DB_FETCHMODE_ASSOC);
+ $query = "SELECT * FROM users";
+ if ($registered_only === true) {
+ $query .= " WHERE registered = 1";
+ }
+ $query .= " ORDER BY handle";
+ return $dbh->getAll($query, null, DB_FETCHMODE_ASSOC);
}
+ // }}}
}
class statistics