FIX: ensures shadow has last_posted_at before comparing to site setting (#10374)

This commit is contained in:
Joffrey JAFFEUX 2020-08-05 13:20:51 +02:00 committed by GitHub
parent cb12a721c4
commit b6e475a8f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -31,6 +31,7 @@ class AnonymousShadowCreator
shadow = user.shadow_user
if shadow && (shadow.post_count + shadow.topic_count) > 0 &&
shadow.last_posted_at &&
shadow.last_posted_at < SiteSetting.anonymous_account_duration_minutes.minutes.ago
shadow = nil
end