Ning import: users who have never posted are trust level 0

This commit is contained in:
Neil Lalonde
2015-02-06 16:03:41 -05:00
parent ef482591bf
commit 07af79c85b
2 changed files with 12 additions and 8 deletions

View File

@@ -561,6 +561,12 @@ class ImportScripts::Base
end
end
def update_tl0
User.all.each do |user|
user.change_trust_level!(0) if Post.where(user_id: user.id).count == 0
end
end
def html_for_upload(upload, display_filename)
if FileHelper.is_image?(upload.url)
embedded_image_html(upload)