diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-11 17:16:13 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-11 17:16:13 +0000 |
commit | 883a720e0efbf44e198dffd8efcf65f8d219b08e (patch) | |
tree | ac18d2ab593fa91dfa1708fa290bb1a2662bdc8e /app/controllers/user_controller.rb | |
parent | d734493ce3bcade2c6a819fc98f9b60c860c3fa7 (diff) | |
parent | f098a984efacc9cb486991e9ea2da206cf853c6e (diff) |
Merge branch 'release/0.5' into develop
Diffstat (limited to 'app/controllers/user_controller.rb')
-rw-r--r-- | app/controllers/user_controller.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index fc29a847c..45b71a3a9 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -116,8 +116,10 @@ class UserController < ApplicationController render :action => 'sign' return else - @user_signin = User.authenticate_from_form(params[:user_signin], @post_redirect.reason_params[:user_name] ? true : false) - if @user_signin.errors.size > 0 + if !@post_redirect.nil? + @user_signin = User.authenticate_from_form(params[:user_signin], @post_redirect.reason_params[:user_name] ? true : false) + end + if @post_redirect.nil? || @user_signin.errors.size > 0 # Failed to authenticate render :action => 'sign' return |