summaryrefslogtreecommitdiff
path: root/includes/model/User_model.php
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2014-09-28 14:50:08 +0200
committerPhilip Häusler <msquare@notrademark.de>2014-09-28 14:50:08 +0200
commit1d9e1c467cf4d3920f9bcf0157481c7ca8ea6d5d (patch)
tree72e815859ba1fc37d82facdabe5ede76f3823ac4 /includes/model/User_model.php
parent0f77edc4fb5581eacd0305ec9010b78afc489b55 (diff)
user list rewritten
Diffstat (limited to 'includes/model/User_model.php')
-rw-r--r--includes/model/User_model.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/includes/model/User_model.php b/includes/model/User_model.php
index 7d2809f7..af4c4a97 100644
--- a/includes/model/User_model.php
+++ b/includes/model/User_model.php
@@ -1,9 +1,19 @@
<?php
+
/**
* User model
*/
/**
+ * Get all users, ordered by Nick by default or by given param.
+ *
+ * @param string $order_by
+ */
+function Users($order_by = 'Nick') {
+ return sql_select("SELECT * FROM `User` ORDER BY `" . sql_escape($order_by) . "` ASC");
+}
+
+/**
* Returns true if user is freeloader
*
* @param User $user