From 3c1946233c54580ebc66c9b046709fb26d09eb41 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 23 Nov 2006 20:19:49 +0000 Subject: [PATCH] r1309: It'd be good if we changed the settings of the user we are editing and not our own --- admin/user.php | 4 ++-- docs/changes.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/admin/user.php b/admin/user.php index 074b987..e92a00e 100644 --- a/admin/user.php +++ b/admin/user.php @@ -103,7 +103,7 @@ if ($_POST['do'] == 'insert') { $bitmask += $option * $yes; } - $db->query("INSERT INTO " . TABLE_PREFIX . "useremail (userid, relation, mask) VALUES (" . $bugsys->userinfo['userid'] . ", $relation, $bitmask)"); + $db->query("INSERT INTO " . TABLE_PREFIX . "useremail (userid, relation, mask) VALUES (" . $user->insertid . ", $relation, $bitmask)"); } $admin->redirect('user.php?do=edit&userid=' . $user->insertid); @@ -130,7 +130,7 @@ if ($_POST['do'] == 'update') $user->set('defaultsortas', $bugsys->in['defaultsortas']); $user->update(); - $db->query("DELETE FROM " . TABLE_PREFIX . "useremail WHERE userid = " . $bugsys->userinfo['userid']); + $db->query("DELETE FROM " . TABLE_PREFIX . "useremail WHERE userid = " . $user->values['userid']); $bugsys->input_clean('emailopts', TYPE_INT); if (is_array($bugsys->in['emailopts'])) { diff --git a/docs/changes.txt b/docs/changes.txt index a16ab3a..37008b7 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -22,6 +22,7 @@ - Fixed display issues in Firefox for RTL languages in the bug report screen and attachment display (http://www.bluestatic.org/bugs/showreport.php?bugid=59) - Localized the version checking information strings in admin/index.php - Localized the word "Home" in the admin/index.php +- Fixed a bug in admin/user.php where email options would be changed for the admin making the changes to another user's account instead of that user 1.1.3 =============================== -- 2.43.5