[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
afuna.
http://bugs.dwscoalition.org/show_bug.cgi?id=349
Allow sending of invites to email addresses belong to existing users.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
-------------------------------------------------------------------------------- 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'}); } --------------------------------------------------------------------------------