mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 09:43:03 +00:00
add search by submitter functionality
This commit is contained in:
parent
fbd7b5a9d4
commit
70af7c7d5c
3 changed files with 35 additions and 5 deletions
|
@ -542,5 +542,24 @@ function rm_rf($dirname="") {
|
|||
return;
|
||||
}
|
||||
|
||||
# obtain the uid given a Users.Username
|
||||
#
|
||||
function uid_from_username($username="")
|
||||
{
|
||||
if (!$username) {
|
||||
return "";
|
||||
}
|
||||
$dbh = db_connect();
|
||||
$q = "SELECT ID FROM Users WHERE Username = '".mysql_escape_string($username)
|
||||
."'";
|
||||
$result = db_query($q, $dbh);
|
||||
if (!$result) {
|
||||
return "None";
|
||||
}
|
||||
$row = mysql_fetch_row($result);
|
||||
|
||||
return $row[0];
|
||||
}
|
||||
|
||||
# vim: ts=2 sw=2 noet ft=php
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue