From 82ae9255add88ed68dacc7c7b75d7bdd431a0c1c Mon Sep 17 00:00:00 2001 From: francis Date: Wed, 9 Jan 2008 19:56:00 +0000 Subject: Say that they will have to log in to classify. --- app/controllers/application.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/controllers/application.rb') diff --git a/app/controllers/application.rb b/app/controllers/application.rb index 2149c7b09..e01f264a2 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: application.rb,v 1.25 2008-01-09 17:47:31 francis Exp $ +# $Id: application.rb,v 1.26 2008-01-09 19:56:01 francis Exp $ class ApplicationController < ActionController::Base @@ -50,7 +50,11 @@ class ApplicationController < ActionController::Base # Return logged in user def authenticated_user - return User.find(session[:user_id]) + if session[:user_id].nil? + return nil + else + return User.find(session[:user_id]) + end end # Do a POST redirect. This is a nasty hack - we store the posted values in -- cgit v1.2.3