diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2009-02-11 19:07:41 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2009-02-11 19:07:41 +0000 |
commit | 85ad791d815ce197b381b42fcd1503ecef0d34f5 (patch) | |
tree | 5ff9170e9c133e21bb0965fb674f743c69b1e0a1 /app/controllers/account_controller.rb | |
parent | 720f928cd2cafd0edb4357bce9d63e3b4dd10c3b (diff) | |
download | redmine-85ad791d815ce197b381b42fcd1503ecef0d34f5.tar.gz redmine-85ad791d815ce197b381b42fcd1503ecef0d34f5.zip |
Prevent registration via OpenID if self registration is off. #699
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2448 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/account_controller.rb')
-rw-r--r-- | app/controllers/account_controller.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 4bfe562c6..9f5200ee3 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -183,6 +183,9 @@ private if result.successful? user = User.find_or_initialize_by_identity_url(identity_url) if user.new_record? + # Self-registration off + redirect_to(home_url) && return unless Setting.self_registration? + # Create on the fly user.login = registration['nickname'] unless registration['nickname'].nil? user.mail = registration['email'] unless registration['email'].nil? |