holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r22068: LJSUP-12322: Do not display captcha if u...

Committer: akanashin
LJSUP-12322: Do not display captcha if user has social capital more than 15
U   trunk/cgi-bin/LJ/Talk/Post.pm
Modified: trunk/cgi-bin/LJ/Talk/Post.pm
===================================================================
--- trunk/cgi-bin/LJ/Talk/Post.pm	2012-05-25 13:19:12 UTC (rev 22067)
+++ trunk/cgi-bin/LJ/Talk/Post.pm	2012-05-25 13:25:31 UTC (rev 22068)
@@ -586,6 +586,11 @@
     
     return if $commenter && $commenter->prop('in_whitelist_for_spam');
 
+    ## LJSUP-12322: Do not display captcha if user has social capital more than 15
+    my $soc_cap = LJ::PersonalStats::DB->fetch_raw('ratings', { func => 'get_authority', journal_id => $commenter->userid });
+    $soc_cap = $soc_cap->{result}->{authority};
+    return if $soc_cap > 15;
+
     ## allow some users (our bots) to post without captchas in any rate
     return if $commenter and 
               grep { $commenter->username eq $_ } @LJ::NO_RATE_CHECK_USERS;

Tags: akanashin, holyandrew, livejournal, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments