summaryrefslogtreecommitdiffstats
path: root/web/lib/aur.inc
diff options
context:
space:
mode:
authoreric <eric>2004-07-02 00:20:09 +0200
committereric <eric>2004-07-02 00:20:09 +0200
commit993fcb7811d763368a6940730d3870b0013623c0 (patch)
tree4665a7a5abc964b4877ffebed626835a83789773 /web/lib/aur.inc
parentab6afc990ccfca02e3c027be2b97ded6c9f51ad6 (diff)
downloadaur-993fcb7811d763368a6940730d3870b0013623c0.tar.gz
aur-993fcb7811d763368a6940730d3870b0013623c0.tar.xz
still working on pkgsearch.php::do_Details
Diffstat (limited to 'web/lib/aur.inc')
-rw-r--r--web/lib/aur.inc18
1 files changed, 18 insertions, 0 deletions
diff --git a/web/lib/aur.inc b/web/lib/aur.inc
index f97a1312..bdec6435 100644
--- a/web/lib/aur.inc
+++ b/web/lib/aur.inc
@@ -140,6 +140,24 @@ function new_sid() {
}
+# obtain the username if given their Users.ID
+#
+function username_from_id($id="") {
+ if (!$id) {
+ return "";
+ }
+ $dbh = db_connect();
+ $q = "SELECT Username FROM Users WHERE ID = " . mysql_escape_string($id);
+ $result = db_query($q, $dbh);
+ if (!$result) {
+ return "None";
+ }
+ $row = mysql_fetch_row($result);
+
+ return $row[0];
+}
+
+
# obtain the username if given their current SID
#
function username_from_sid($sid="") {