Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[ljcom] r11118: LJSUP-6301 (Purge innactive accounts)

Committer: ailyin
LJSUP-6301 (Purge innactive accounts)
U   trunk/cgi-bin/LJ/User/Inactive.pm
Modified: trunk/cgi-bin/LJ/User/Inactive.pm
===================================================================
--- trunk/cgi-bin/LJ/User/Inactive.pm	2011-10-25 12:19:26 UTC (rev 11117)
+++ trunk/cgi-bin/LJ/User/Inactive.pm	2011-10-26 08:17:42 UTC (rev 11118)
@@ -324,6 +324,14 @@
 
     my $u = LJ::want_user($userid);
 
+    unless ($u) {
+        # not all userids have a user existing with them, so
+        # in case we find one, let's disregard the user completely
+        $dbh->do( 'DELETE FROM user_active_until WHERE userid=?',
+            undef, $userid );
+        return;
+    }
+
     if (is_inactive_user($u)) {
         my $cdbh = LJ::get_cluster_master($u);
         $cdbh->{'RaiseError'} = 1;

Tags: ailyin, andy, ljcom, 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