diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-05-12 12:11:02 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-05-12 12:11:02 -0400 |
commit | d1efb66ad7b017f0fbfe6f0c20843b30f396e504 (patch) | |
tree | 5b48a38382015de815b2d45d58836c5ca06b631c /api/authentication.go | |
parent | 3f0325fd223dcb3a6eec92f772df1e7541ab0b2b (diff) | |
parent | 9a701b7e5b31ca803a2d92f0b3b1d7cc68bf3c37 (diff) | |
download | chat-d1efb66ad7b017f0fbfe6f0c20843b30f396e504.tar.gz chat-d1efb66ad7b017f0fbfe6f0c20843b30f396e504.tar.bz2 chat-d1efb66ad7b017f0fbfe6f0c20843b30f396e504.zip |
Merge branch 'release-3.0'
Diffstat (limited to 'api/authentication.go')
-rw-r--r-- | api/authentication.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/api/authentication.go b/api/authentication.go index 10ed578e1..9243947ad 100644 --- a/api/authentication.go +++ b/api/authentication.go @@ -39,17 +39,17 @@ func checkUserPassword(user *model.User, password string) *model.AppError { } } -func checkLdapUserPasswordAndAllCriteria(ldapId, password, mfaToken string) (*model.User, *model.AppError) { +func checkLdapUserPasswordAndAllCriteria(ldapId *string, password string, mfaToken string) (*model.User, *model.AppError) { ldapInterface := einterfaces.GetLdapInterface() - if ldapInterface == nil { + if ldapInterface == nil || ldapId == nil { err := model.NewLocAppError("doLdapAuthentication", "api.user.login_ldap.not_available.app_error", nil, "") err.StatusCode = http.StatusNotImplemented return nil, err } var user *model.User - if ldapUser, err := ldapInterface.DoLogin(ldapId, password); err != nil { + if ldapUser, err := ldapInterface.DoLogin(*ldapId, password); err != nil { err.StatusCode = http.StatusUnauthorized return nil, err } else { |