Committer: ailyin
LJSUP-11154 (Script for deleting inactine accounts shouldn't delete account if it change password)U trunk/cgi-bin/LJ/User/Inactive.pm
Modified: trunk/cgi-bin/LJ/User/Inactive.pm =================================================================== --- trunk/cgi-bin/LJ/User/Inactive.pm 2012-02-06 10:54:39 UTC (rev 11409) +++ trunk/cgi-bin/LJ/User/Inactive.pm 2012-02-06 11:38:04 UTC (rev 11410) @@ -252,9 +252,13 @@ if ($u->is_personal or $u->is_identity) { return unless $u->is_visible; return if $u->get_cap('paid'); - return unless $u->last_login_time < - time - SECONDS_IN_MONTH * $LJ::INACTIVE_ACCOUNT_MONTHS; + my $require_activity_after = + time - SECONDS_IN_MONTH * $LJ::INACTIVE_ACCOUNT_MONTHS; + + return if $u->last_login_time > $require_activity_after; + return if $u->last_password_change_time > $require_activity_after; + return unless _check_user_entries($u); return 1;