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;