From e9d8e9b8c074421d15103fd66112dea78800e72a Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Thu, 22 Mar 2012 15:15:57 +0100 Subject: Support canonical links to accounts Addresses FS#9582 and FS#21600. Signed-off-by: Lukas Fleischer --- web/html/account.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'web/html/account.php') diff --git a/web/html/account.php b/web/html/account.php index 339316b..f17ba48 100644 --- a/web/html/account.php +++ b/web/html/account.php @@ -75,7 +75,11 @@ if (isset($_COOKIE["AURSID"])) { $q = "SELECT Users.*, AccountTypes.AccountType "; $q.= "FROM Users, AccountTypes "; $q.= "WHERE AccountTypes.ID = Users.AccountTypeID "; - $q.= "AND Users.ID = ".intval(in_request("ID")); + if (isset($_REQUEST["ID"])) { + $q.= "AND Users.ID = ".intval(in_request("ID")); + } else { + $q.= "AND Users.Username = '".db_escape_string(in_request("U")) . "'"; + } $result = db_query($q, $dbh); if (!mysql_num_rows($result)) { print __("Could not retrieve information for the specified user."); -- cgit v1.2.3-54-g00ecf