diff options
Diffstat (limited to 'app/controllers/user_controller.rb')
-rw-r--r-- | app/controllers/user_controller.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 2dab3c522..7eb506337 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: user_controller.rb,v 1.37 2008-03-12 16:07:13 francis Exp $ +# $Id: user_controller.rb,v 1.38 2008-03-13 00:14:17 francis Exp $ class UserController < ApplicationController # Show page about a set of users with same url name @@ -15,6 +15,9 @@ class UserController < ApplicationController end @display_user = User.find(:first, :conditions => [ "url_name = ? and email_confirmed", params[:url_name] ]) + if not @display_user + raise "user not found" + end @same_name_users = User.find(:all, :conditions => [ "name = ? and email_confirmed and id <> ?", @display_user.name, @display_user.id ], :order => "created_at") end |