@@ -27,12 +27,7 class AccountController < ApplicationController | |||||
27 | if request.get? |
|
27 | if request.get? | |
28 | logout_user |
|
28 | logout_user | |
29 | else |
|
29 | else | |
30 |
|
|
30 | authenticate_user | |
31 | if Setting.openid? && using_open_id? |
|
|||
32 | open_id_authenticate(params[:openid_url]) |
|
|||
33 | else |
|
|||
34 | password_authentication |
|
|||
35 | end |
|
|||
36 | end |
|
31 | end | |
37 | end |
|
32 | end | |
38 |
|
33 | |||
@@ -138,6 +133,14 class AccountController < ApplicationController | |||||
138 | self.logged_user = nil |
|
133 | self.logged_user = nil | |
139 | end |
|
134 | end | |
140 |
|
135 | |||
|
136 | def authenticate_user | |||
|
137 | if Setting.openid? && using_open_id? | |||
|
138 | open_id_authenticate(params[:openid_url]) | |||
|
139 | else | |||
|
140 | password_authentication | |||
|
141 | end | |||
|
142 | end | |||
|
143 | ||||
141 | def password_authentication |
|
144 | def password_authentication | |
142 | user = User.try_to_login(params[:username], params[:password]) |
|
145 | user = User.try_to_login(params[:username], params[:password]) | |
143 |
|
146 |
General Comments 0
You need to be logged in to leave comments.
Login now