Closed
Bug 437256
Opened 17 years ago
Closed 17 years ago
Error message when adding vouchers to CVS accounts
Categories
(Webtools Graveyard :: Despot, defect)
Webtools Graveyard
Despot
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: marcia, Assigned: reed)
Details
Attachments
(1 file)
|
1.24 KB,
patch
|
timeless
:
review+
|
Details | Diff | Splinter Review |
Today I tried to add Mitchell as a voucher for Tiffney, and I used her .com address. When I tried to change to the .org address, I get an error message. I then tried to use my email address and received the same error. So basically now I cannot add a voucher without getting an error message.
| Assignee | ||
Comment 1•17 years ago
|
||
What is the error?
| Reporter | ||
Comment 2•17 years ago
|
||
Can't change email to 'marcia@mozilla.org'; already used.
Please hit back and try again.
| Assignee | ||
Comment 3•17 years ago
|
||
Something is wrong in this block of code:
foreach my $field ("email", "voucher") {
my $value = param($field);
if ($value ne param("orig_$field")) {
if ($field == "email") {
my $query = $::db->prepare("SELECT COUNT(*) FROM users WHERE email = ?");
$query->execute($value);
my @row;
@row = $query->fetchrow_array();
if ($row[0] > 0) {
Punt("Can't change email to '$value'; already used.");
}
}
elsif ($field == "voucher") {
# EmailToId() will Punt() if the voucher is not valid.
$value = EmailToId($value, 1);
}
}
}
I think it's in the use of |my| here... basically, attempting to change the voucher results in the "Can't change email to" Punt(), which should be only for when the email is changed.
Severity: normal → major
OS: Mac OS X → All
Hardware: PC → All
| Assignee | ||
Comment 4•17 years ago
|
||
n00b perl mistake :(
Comment on attachment 332682 [details] [diff] [review]
patch - v1
:(... my fault for not catching it... it was even visible in context.
Attachment #332682 -
Flags: review?(timeless) → review+
| Assignee | ||
Comment 6•17 years ago
|
||
Checking in despot.cgi;
/cvsroot/mozilla/webtools/despot/despot.cgi,v <-- despot.cgi
new revision: 1.61; previous revision: 1.60
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•