summaryrefslogtreecommitdiffstats
path: root/editusers.cgi
diff options
context:
space:
mode:
authorterry%mozilla.org <>2000-02-18 01:46:36 +0100
committerterry%mozilla.org <>2000-02-18 01:46:36 +0100
commita735df3a485f6ff993a78e0dd263b900cd1576ff (patch)
treef8372865ddb94f28622cd461731b8931b8d9bae4 /editusers.cgi
parent98292643e4c104d5285224bcad915af6f61f9b29 (diff)
downloadbugzilla-a735df3a485f6ff993a78e0dd263b900cd1576ff.tar.gz
bugzilla-a735df3a485f6ff993a78e0dd263b900cd1576ff.tar.xz
Was crashing when logging profile activity.
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-xeditusers.cgi9
1 files changed, 6 insertions, 3 deletions
diff --git a/editusers.cgi b/editusers.cgi
index 03819ec35..1b5d396a7 100755
--- a/editusers.cgi
+++ b/editusers.cgi
@@ -659,8 +659,8 @@ if ($action eq 'update') {
my $emailnotificationold = trim($::FORM{emailnotificationold} || '');
my $disabledtext = trim($::FORM{disabledtext} || '');
my $disabledtextold = trim($::FORM{disabledtextold} || '');
- my $groupsetold = trim($::FORM{groupsetold} || '');
- my $blessgroupsetold = trim($::FORM{blessgroupsetold} || '');
+ my $groupsetold = trim($::FORM{groupsetold} || '0');
+ my $blessgroupsetold = trim($::FORM{blessgroupsetold} || '0');
my $groupset = "0";
foreach (keys %::FORM) {
@@ -681,6 +681,9 @@ if ($action eq 'update') {
# them, be sure to test for WHERE='$product' or WHERE='$productold'
if ($groupset ne $groupsetold) {
+ SendSQL("SELECT groupset FROM profiles WHERE login_name=" .
+ SqlQuote($userold));
+ $groupsetold = FetchOneColumn();
SendSQL("UPDATE profiles
SET groupset =
groupset - (groupset & $opblessgroupset) + $groupset
@@ -696,7 +699,7 @@ if ($action eq 'update') {
($u, $groupset) = (FetchSQLData());
if ($groupset ne $groupsetold) {
SendSQL("INSERT INTO profiles_activity " .
- "(userid,who,profiles_when,fieldid,oldvalue,newvalue)" .
+ "(userid,who,profiles_when,fieldid,oldvalue,newvalue) " .
"VALUES " .
"($u, $::userid, now(), $fieldid, " .
" $groupsetold, $groupset)");