diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-01-11 12:55:10 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-01-11 12:55:10 +0000 |
commit | 3265b349197a07152dd0650444c205a267697228 (patch) | |
tree | e5ef8a29fdb07075a70bc9b142d3d3db5cc552b9 /services | |
parent | ff4f55fb5f7575fe6e629e782232c5eb0df4c8f8 (diff) | |
download | semanticscuttle-3265b349197a07152dd0650444c205a267697228.tar.gz semanticscuttle-3265b349197a07152dd0650444c205a267697228.tar.bz2 |
new feature: creation of a page listing all users and a user block on the front page
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@12 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'services')
-rw-r--r-- | services/userservice.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/services/userservice.php b/services/userservice.php index 4a7cd4f..381ae51 100644 --- a/services/userservice.php +++ b/services/userservice.php @@ -62,6 +62,22 @@ class UserService { return false; } + function & getUsers($nb=0) { + $query = 'SELECT * FROM '. $this->getTableName() .' ORDER BY `uId` DESC'; + if($nb>0) { + $query .= ' LIMIT 0, '.$nb; + } + if (! ($dbresult =& $this->db->sql_query($query)) ) { + message_die(GENERAL_ERROR, 'Could not get user', '', __LINE__, __FILE__, $query, $this->db); + return false; + } + + while ($row = & $this->db->sql_fetchrow($dbresult)) { + $users[] = $row; + } + return $users; + } + function _randompassword() { $seed = (integer) md5(microtime()); mt_srand($seed); |