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-02-24 08:05 am

[dw-free] sending invites to an already-used email address

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

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

Allow sending of invites to email addresses belong to existing users.

Patch by [personal profile] afuna.

--------------------------------------------------------------------------------
diff -r 8dc39a66fdcf -r 1451fd84ea3d htdocs/manage/circle/invite.bml
--- a/htdocs/manage/circle/invite.bml	Sun Feb 22 18:25:30 2009 +0000
+++ b/htdocs/manage/circle/invite.bml	Tue Feb 24 08:05:13 2009 +0000
@@ -62,17 +62,20 @@
                 $bogus->("email", $ML{'.error.useralreadyhasaccount'});
             }
 
-            my $dbh = LJ::get_db_reader();
-            my $ct = $dbh->selectrow_array("SELECT COUNT(*) FROM email WHERE email = ?", undef, $email);
-
-            if ($ct > 0) {
-                my $findfriends_userhasaccount = LJ::run_hook("findfriends_invite_user_has_account");
-                if ($findfriends_userhasaccount) {
-                    $bogus->("email", $findfriends_userhasaccount);
-                } else {
-                    $bogus->("email", $ML{'.error.useralreadyhasaccount'});
+            unless ( $LJ::USE_ACCT_CODES ) {
+                my $dbh = LJ::get_db_reader();
+                my $ct = $dbh->selectrow_array("SELECT COUNT(*) FROM email WHERE email = ?", undef, $email);
+    
+                if ($ct > 0) {
+                    my $findfriends_userhasaccount = LJ::run_hook("findfriends_invite_user_has_account");
+                    if ($findfriends_userhasaccount) {
+                        $bogus->("email", $findfriends_userhasaccount);
+                    } else {
+                        $bogus->("email", $ML{'.error.useralreadyhasaccount'});
+                    }
                 }
             }
+
         } else {
             $bogus->("email", $ML{'.error.noemail'});
         }
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org