Only use OTRS auth backend if endpoint exists.

This commit is contained in:
Martin Edenhofer 2013-02-01 07:31:57 +01:00
parent 6982183086
commit 11ff582c6d

View file

@ -1,6 +1,9 @@
class Auth::OTRS
def self.check( user, username, password, config )
endpoint = Setting.get('import_otrs_endpoint')
return false if !endpoint || endpoint.empty?
# connect to OTRS
result = Import::OTRS.auth( username, password )
return false if !result