diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 4a05b69..55e251d 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -85,6 +85,13 @@ class ApplicationController < ActionController::Base Time.zone = cuser.time_zone cuser.update_attribute :lastvisit, Time.now.utc if cuser&.lastvisit < 2.minutes.ago.utc + # FIXME: there is a bug in steam auth that causes nil profile + unless cuser.profile&.present? + flash[:notice] = "Your profile has been removed and recreated." + cuser.build_profile + cuser.save + end + if cuser.banned? Ban::TYPE_SITE session[:user] = nil @cuser = nil