summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-03-04 05:33:54 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-03-04 05:33:54 +0000
commitafdcd770dcb9d6b3b1f8fe301edb06a05596a5fb (patch)
treeacdae21e866db7287b0d28d23587cf96a8672b07 /app
parentbc79caaf69d1abb2605ccaea1bc386086300b338 (diff)
downloadredmine-afdcd770dcb9d6b3b1f8fe301edb06a05596a5fb.tar.gz
redmine-afdcd770dcb9d6b3b1f8fe301edb06a05596a5fb.zip
Refactor: Extract method
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3538 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/controllers/account_controller.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index b459906cb..8d807eb3c 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -27,12 +27,7 @@ class AccountController < ApplicationController
if request.get?
logout_user
else
- # Authenticate user
- if Setting.openid? && using_open_id?
- open_id_authenticate(params[:openid_url])
- else
- password_authentication
- end
+ authenticate_user
end
end
@@ -138,6 +133,14 @@ class AccountController < ApplicationController
self.logged_user = nil
end
+ def authenticate_user
+ if Setting.openid? && using_open_id?
+ open_id_authenticate(params[:openid_url])
+ else
+ password_authentication
+ end
+ end
+
def password_authentication
user = User.try_to_login(params[:username], params[:password])