diff options
author | francis <francis> | 2007-12-14 13:42:28 +0000 |
---|---|---|
committer | francis <francis> | 2007-12-14 13:42:28 +0000 |
commit | 924dfca287215c16a817a17a94000876d1b0bec6 (patch) | |
tree | 5b585bc5bc00709569aa76bffa3607c446e05daf /app/controllers/user_controller.rb | |
parent | 9bdc07ebd51d0fb77a703a6f6c1e968d87bc699d (diff) |
Give better error for bad confirmation tokens.
Diffstat (limited to 'app/controllers/user_controller.rb')
-rw-r--r-- | app/controllers/user_controller.rb | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index cf412c473..7f076bfb2 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.19 2007-11-19 12:36:57 francis Exp $ +# $Id: user_controller.rb,v 1.20 2007-12-14 13:42:28 francis Exp $ class UserController < ApplicationController # XXX See controllers/application.rb simplify_url_part for reverse of expression in SQL below @@ -66,14 +66,10 @@ class UserController < ApplicationController def confirm post_redirect = PostRedirect.find_by_email_token(params[:email_token]) - # XXX add message like this if post_redirect not found - # err(sprintf(_("Please check the URL (i.e. the long code of - # letters and numbers) is copied correctly from your email. If - # you can't click on it in the email, you'll have to select and - # copy it from the email. Then paste it into your browser, into - # the place you would type the address of any other webpage. - # Technical details: The token '%s' wasn't found."), $q_t)); - # + if post_redirect.nil? + render 'user/bad_token' + return + end @user = post_redirect.user @user.email_confirmed = true |