start = 0
User.where("image_use_gravatar AND id >=" + start.to_s).order("id").find_each do |user|
p "checked up to id " + user.id.to_s if (user.id % 1000).zero? # just give a rough indication where we are for restarting
start = 0
User.where("image_use_gravatar AND id >=" + start.to_s).order("id").find_each do |user|
p "checked up to id " + user.id.to_s if (user.id % 1000).zero? # just give a rough indication where we are for restarting
hash = Digest::MD5.hexdigest(user.email.downcase)
url = "https://www.gravatar.com/avatar/#{hash}?d=404" # without d=404 we will always get an image back
hash = Digest::MD5.hexdigest(user.email.downcase)
url = "https://www.gravatar.com/avatar/#{hash}?d=404" # without d=404 we will always get an image back