]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/concerns/user_methods.rb
Merge branch 'pull/4985'
[rails.git] / app / controllers / concerns / user_methods.rb
index 28305b5c3d55e2beed6c77cefbe6639532f42f2f..d79ed48d2ca742be14faad6db9f637b09dd247e4 100644 (file)
@@ -6,9 +6,10 @@ module UserMethods
   ##
   # ensure that there is a "user" instance variable
   def lookup_user
   ##
   # ensure that there is a "user" instance variable
   def lookup_user
-    @user = User.active.find_by!(:display_name => params[:display_name])
+    display_name = params[:display_name] || params[:user_display_name]
+    @user = User.active.find_by!(:display_name => display_name)
   rescue ActiveRecord::RecordNotFound
   rescue ActiveRecord::RecordNotFound
-    render_unknown_user params[:display_name]
+    render_unknown_user display_name
   end
 
   ##
   end
 
   ##