summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-07 06:22:35 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-07 06:22:35 +0000
commit76a4b81cf3a9a6c8b4a8a1fa6dca65c841508454 (patch)
tree62edc7b1ab63a870af235d70fbd0ad236481ad26 /app
parent6086aa1be4b2010383c702982847434e30960d1e (diff)
downloadredmine-76a4b81cf3a9a6c8b4a8a1fa6dca65c841508454.tar.gz
redmine-76a4b81cf3a9a6c8b4a8a1fa6dca65c841508454.zip
Fixed: Openid registration form should not require user to enter password (#11331).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9929 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/controllers/account_controller.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index fa530087e..5c4ecaf40 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -84,8 +84,9 @@ class AccountController < ApplicationController
session[:auth_source_registration] = nil
@user = User.new(:language => Setting.default_language)
else
+ user_params = params[:user] || {}
@user = User.new
- @user.safe_attributes = params[:user]
+ @user.safe_attributes = user_params
@user.admin = false
@user.register
if session[:auth_source_registration]
@@ -100,7 +101,9 @@ class AccountController < ApplicationController
end
else
@user.login = params[:user][:login]
- @user.password, @user.password_confirmation = params[:user][:password], params[:user][:password_confirmation]
+ unless user_params[:identity_url].present? && user_params[:password].blank? && user_params[:password_confirmation].blank?
+ @user.password, @user.password_confirmation = user_params[:password], user_params[:password_confirmation]
+ end
case Setting.self_registration
when '1'