]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Update Potlatch 2 to 2.3-367-ga54da3b build
[rails.git] / app / controllers / application_controller.rb
index 25f4054a3347dd61439f3b7e2e9f65a017f7d77b..7aace73640ac076a888828cdf06788bd094399aa 100644 (file)
@@ -362,6 +362,14 @@ class ApplicationController < ActionController::Base
     !@user.nil?
   end
 
     !@user.nil?
   end
 
+  ##
+  # ensure that there is a "this_user" instance variable
+  def lookup_this_user
+    unless @this_user = User.active.find_by_display_name(params[:display_name])
+      render_unknown_user params[:display_name]
+    end
+  end
+
   ##
   # render a "no such user" page
   def render_unknown_user(name)
   ##
   # render a "no such user" page
   def render_unknown_user(name)