mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-06-14 06:12 pm

[dw-free] Include email address on invite code management page until used

[commit: http://hg.dwscoalition.org/dw-free/rev/f87be08847c5]

http://bugs.dwscoalition.org/show_bug.cgi?id=604

Wipe email address invite code was sent to when it is used.

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/DW/InviteCodes.pm
--------------------------------------------------------------------------------
diff -r abb35acb08ba -r f87be08847c5 cgi-bin/DW/InviteCodes.pm
--- a/cgi-bin/DW/InviteCodes.pm	Fri Jun 12 22:01:20 2009 +0000
+++ b/cgi-bin/DW/InviteCodes.pm	Sun Jun 14 18:12:35 2009 +0000
@@ -195,7 +195,7 @@ sub use_code {
 
     $self->{rcptid} = $opts{user}->{userid};
 
-    $dbh->do( "UPDATE acctcode SET rcptid=? WHERE acid=?",
+    $dbh->do( "UPDATE acctcode SET email=NULL, rcptid=? WHERE acid=?",
         undef, $opts{user}->{userid}, $self->{acid} );
 
     return 1; # 1 means success? Needs error return in that case.
--------------------------------------------------------------------------------