diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-05-10 09:46:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-10 09:46:09 -0700 |
commit | d8dd271e43550ab043c2db36c274092d7819fcab (patch) | |
tree | e297c0534a9684d57fc254281cf5cbc3d7c08e0f /api | |
parent | db6b8f6238853c6e7e48dc8015a0b25f97ee232a (diff) | |
download | chat-d8dd271e43550ab043c2db36c274092d7819fcab.tar.gz chat-d8dd271e43550ab043c2db36c274092d7819fcab.tar.bz2 chat-d8dd271e43550ab043c2db36c274092d7819fcab.zip |
MM-4998 Adding LoginIdAttribute to allow LDAP users to change their login ID without losing their account (#8756)
* Adding LoginIdAttribute
* Modifying LDAP to use loginIDAttribute.
* Adding IDAttribute migration and AD objectGUID support.
* Removing unused idea.
* Fix typo.
Diffstat (limited to 'api')
-rw-r--r-- | api/user.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/user.go b/api/user.go index 15fd4c7ea..5931eac1e 100644 --- a/api/user.go +++ b/api/user.go @@ -107,7 +107,7 @@ func login(c *Context, w http.ResponseWriter, r *http.Request) { ldapOnly := props["ldap_only"] == "true" c.LogAudit("attempt - user_id=" + id + " login_id=" + loginId) - user, err := c.App.AuthenticateUserForLogin(id, loginId, password, mfaToken, deviceId, ldapOnly) + user, err := c.App.AuthenticateUserForLogin(id, loginId, password, mfaToken, ldapOnly) if err != nil { c.LogAudit("failure - user_id=" + id + " login_id=" + loginId) c.Err = err @@ -1072,7 +1072,7 @@ func checkMfa(c *Context, w http.ResponseWriter, r *http.Request) { } rdata := map[string]string{} - if user, err := c.App.GetUserForLogin(loginId, false); err != nil { + if user, err := c.App.GetUserForLogin("", loginId); err != nil { rdata["mfa_required"] = "false" } else { rdata["mfa_required"] = strconv.FormatBool(user.MfaActive) |