display_name = params[:display_name]
if target_user.nil? and !display_name.blank?
target_user = User.find(:first, :conditions => [ "visible = ? and display_name = ?", true, display_name])
+ if target_user.nil?
+ @not_found_user = display_name
+ render :action => 'no_such_user', :status => :not_found
+ return
+ end
end
# set title
--- /dev/null
+<h2><%= h(@not_found_user) %></h2>
+<p>Sorry, there is no user with the name <%= @not_found_user -%>. Please check your spelling, or maybe the link you clicked is wrong.</p>