From 9675dbfe2271b8c1e0ebd40f830d103bd61443f1 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 6 May 2013 00:47:58 +0200 Subject: [PATCH] Improved error handling. --- app/models/user.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/user.rb b/app/models/user.rb index 90c6da64d..3c5ca8000 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -75,6 +75,7 @@ class User < ApplicationModel # try to login against configure auth backends user_auth = nil config.each {|config_item| + next if !config_item[:adapter] file = "auth/#{config_item[:adapter]}" require file user_auth = Auth.const_get("#{config_item[:adapter].to_s.upcase}").check( username, password, config_item, user ) @@ -124,6 +125,7 @@ class User < ApplicationModel # try to login against configure auth backends user_auth = nil config.each {|config_item| + next if !config_item[:adapter] file = "sso/#{config_item[:adapter]}" require file user_auth = SSO.const_get("#{config_item[:adapter].to_s.upcase}").check( params, config_item )