]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
Return "404 Not Found" for users and traces which don't exist.
[rails.git] / app / controllers / user_controller.rb
index 0042be316d1cc8e2428d656b348e3dfedf27061a..d945e53a24be6c0a186d346d75715fdb13123e13 100644 (file)
@@ -172,7 +172,12 @@ class UserController < ApplicationController
 
   def view
     @this_user = User.find_by_display_name(params[:display_name])
-    @title = @this_user.display_name
+
+    if @this_user
+      @title = @this_user.display_name
+    else
+      render :nothing => true, :status => :not_found
+    end
   end
 
   def make_friend