Improved error handling.
This commit is contained in:
parent
996e17a12d
commit
4487b988b1
1 changed files with 2 additions and 0 deletions
|
@ -76,6 +76,7 @@ class User < ApplicationModel
|
|||
user_auth = nil
|
||||
config.each {|config_item|
|
||||
next if !config_item[:adapter]
|
||||
next if config_item.class == TrueClass
|
||||
file = "auth/#{config_item[:adapter]}"
|
||||
require file
|
||||
user_auth = Auth.const_get("#{config_item[:adapter].to_s.upcase}").check( username, password, config_item, user )
|
||||
|
@ -126,6 +127,7 @@ class User < ApplicationModel
|
|||
user_auth = nil
|
||||
config.each {|config_item|
|
||||
next if !config_item[:adapter]
|
||||
next if config_item.class == TrueClass
|
||||
file = "sso/#{config_item[:adapter]}"
|
||||
require file
|
||||
user_auth = SSO.const_get("#{config_item[:adapter].to_s.upcase}").check( params, config_item )
|
||||
|
|
Loading…
Reference in a new issue