kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2010-08-19 02:36 pm

[dw-free] Implement renames

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

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

Fix changes to renameuser.pl.

Patch by [personal profile] kareila.

Files modified:
  • bin/renameuser.pl
--------------------------------------------------------------------------------
diff -r e4bbbdb03788 -r f9c42f7e4fd4 bin/renameuser.pl
--- a/bin/renameuser.pl	Thu Aug 19 18:08:53 2010 +0800
+++ b/bin/renameuser.pl	Thu Aug 19 09:36:22 2010 -0500
@@ -57,8 +57,8 @@ unless ($args{force}) {
     }
     unless (lc($acct[0]->email_raw) eq lc($acct[1]->email_raw)) {
         print "Email addresses don't match.\n";
-        print "   " . $acct[0]->raw_email . "\n";
-        print "   " . $acct[1]->raw_email . "\n";
+        print "   " . $acct[0]->email_raw . "\n";
+        print "   " . $acct[1]->email_raw . "\n";
         exit 1;
     }
     unless ($acct[0]->password eq $acct[1]->password) {
@@ -154,8 +154,8 @@ sub rename_user
     LJ::procnotify_add("rename_user", { 'user' => $u->{'user'},
                                         'userid' => $u->{'userid'} });
 
-    #$dbh->do("INSERT INTO renames (renid, token, payid, userid, fromuser, touser, rendate) ".
-    #         "VALUES (NULL,'[manual]',0,$u->{userid},$qfrom,$qto,NOW())");
+    $dbh->do( "INSERT INTO renames (renid, token, payid, userid, fromuser, touser, rendate) ".
+              "VALUES ( NULL, '[manual]', 0, $u->{userid}, $qfrom, $qto, NOW() )" );
 
     return 1;
 }
--------------------------------------------------------------------------------