summaryrefslogtreecommitdiffstats
path: root/web/html/account.php
diff options
context:
space:
mode:
authorpjmattal <pjmattal>2005-06-10 06:52:46 +0200
committerpjmattal <pjmattal>2005-06-10 06:52:46 +0200
commitc7e4f5c7fa8e4ba9e9503f70a3334d33f31b78e1 (patch)
treeb49f8c311d398367269b9e6572e5b280547c7e1f /web/html/account.php
parent45e5883a1579ef64071d161a216e7159bfab1daf (diff)
downloadaur-c7e4f5c7fa8e4ba9e9503f70a3334d33f31b78e1.tar.gz
aur-c7e4f5c7fa8e4ba9e9503f70a3334d33f31b78e1.tar.xz
Added Simo's patch for #2579, adding user info page
also modified it slightly so that we no longer look at AURMaintainerUID for maintainer
Diffstat (limited to 'web/html/account.php')
-rw-r--r--web/html/account.php23
1 files changed, 21 insertions, 2 deletions
diff --git a/web/html/account.php b/web/html/account.php
index d911f933..841ed66a 100644
--- a/web/html/account.php
+++ b/web/html/account.php
@@ -59,7 +59,24 @@ if (isset($_COOKIE["AURSID"])) {
}
}
- } elseif ($_REQUEST["Action"] == "UpdateAccount") {
+ } elseif ($_REQUEST["Action"] == "AccountInfo") {
+ # no editing, just looking up user info
+ #
+ $q = "SELECT Users.*, AccountTypes.AccountType ";
+ $q.= "FROM Users, AccountTypes ";
+ $q.= "WHERE AccountTypes.ID = Users.AccountTypeID ";
+ $q.= "AND Users.ID = ".intval($_REQUEST["ID"]);
+ $result = db_query($q, $dbh);
+ if (!mysql_num_rows($result)) {
+ print __("Could not retrieve information for the specified user.");
+ } else {
+ $row = mysql_fetch_assoc($result);
+ display_account_info($row["Username"],
+ $row["AccountType"], $row["Email"], $row["RealName"],
+ $row["IRCNick"]);
+ }
+
+ } elseif ($_REQUEST["Action"] == "UpdateAccount") {
# user is submitting their modifications to an existing account
#
process_account_form($atype, "edit", "UpdateAccount",
@@ -109,7 +126,9 @@ if (isset($_COOKIE["AURSID"])) {
} else {
# visitor is not logged in
#
- if ($_REQUEST["Action"] == "NewAccount") {
+ if ($_REQUEST["Action"] == "AccountInfo") {
+ print __("You must log in to view user information.");
+ } elseif ($_REQUEST["Action"] == "NewAccount") {
# process the form input for creating a new account
#
process_account_form("","new", "NewAccount",