Closed Bug 437256 Opened 17 years ago Closed 17 years ago

Error message when adding vouchers to CVS accounts

Categories

(Webtools Graveyard :: Despot, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: marcia, Assigned: reed)

Details

Attachments

(1 file)

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.
What is the error?
Can't change email to 'marcia@mozilla.org'; already used. Please hit back and try again.
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
Attached patch patch - v1Splinter Review
n00b perl mistake :(
Assignee: justdave → reed
Status: NEW → ASSIGNED
Attachment #332682 - Flags: review?(timeless)
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+
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
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: