aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/user_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/user_controller.rb')
-rw-r--r--app/controllers/user_controller.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb
index cf1eb1d2c..1c0bef5b9 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.67 2009-08-05 16:31:10 francis Exp $
+# $Id: user_controller.rb,v 1.68 2009-08-19 23:20:39 francis Exp $
class UserController < ApplicationController
# Show page about a user
@@ -58,12 +58,23 @@ class UserController < ApplicationController
def signin
work_out_post_redirect
+ # make sure we have cookies
if session.instance_variable_get(:@dbman)
if not session.instance_variable_get(:@dbman).instance_variable_get(:@original)
+ # try and set them if we don't
+ if !params[:again]
+ redirect_to signin_url(:r => params[:r], :again => 1)
+ return
+ end
render :action => 'no_cookies'
return
end
end
+ # remove "cookie setting attempt has happened" parameter if there is one and cookies worked
+ if params[:again]
+ redirect_to signin_url(:r => params[:r], :again => nil)
+ return
+ end
if not params[:user_signin]
# First time page is shown