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

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