- if request.format == :atom and params[:page]
- redirect_to params.merge({ :page => nil }), :status => :moved_permanently
- elsif request.format == :html and !params[:bbox]
+ if request.format == :atom and params[:max_id]
+ redirect_to params.merge({ :max_id => nil }), :status => :moved_permanently
+ return
+ end
+
+ if params[:display_name]
+ user = User.find_by_display_name(params[:display_name])
+ if !user || !user.active?
+ render_unknown_user params[:display_name]
+ return
+ end
+ end
+
+ if (params[:friends] || params[:nearby]) && !@user && request.format == :html
+ require_user
+ return
+ end
+
+ if request.format == :html and !params[:list]
+ require_oauth