From 5355d9b74ccfad9d91bbf8284c4c66a79c2cd878 Mon Sep 17 00:00:00 2001 From: Ryan Walberg Date: Thu, 13 Dec 2012 03:49:56 +0000 Subject: [PATCH] fixes bug 36, any user you edit overwrites your own account --- src/templates/users.tpl | 2 +- src/users.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/templates/users.tpl b/src/templates/users.tpl index 92b549f..2566840 100644 --- a/src/templates/users.tpl +++ b/src/templates/users.tpl @@ -132,7 +132,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
{if $action == "edit" || (isset($haserror) && $action == "update")} - + {else if $action == "" || (isset($haserror) && $action == "insert")} diff --git a/src/users.php b/src/users.php index dee1c81..646538b 100644 --- a/src/users.php +++ b/src/users.php @@ -197,6 +197,7 @@ while ($row = $stmt->fetch()) { } $smarty->assign('action', $action); +$smarty->assign('edituserid', (int) $_GET["userid"]); $smarty->assign('username', $username); if (isset($username_error)) { $smarty->assign('username_error', $username_error);