diff options
author | Corey Hulen <corey@hulen.com> | 2016-05-11 11:04:30 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-05-11 14:04:30 -0400 |
commit | 3928535456f9fcb025ed86edeb4d258f2c524150 (patch) | |
tree | 010f4bd298f23b92711affcdef81cc329c522e67 /api/authentication.go | |
parent | a574397a7256bed7738f499019f97ab468b5161d (diff) | |
download | chat-3928535456f9fcb025ed86edeb4d258f2c524150.tar.gz chat-3928535456f9fcb025ed86edeb4d258f2c524150.tar.bz2 chat-3928535456f9fcb025ed86edeb4d258f2c524150.zip |
PLT-2905 fixing upgrade of SSO accounts (#2962)
* PLT-2905 fixing upgrade of SSO accounts
* Fixing multiple Auths mapped to different emails
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 { |