diff options
author | Martin Kraft <martinkraft@gmail.com> | 2018-05-11 08:05:23 -0400 |
---|---|---|
committer | Martin Kraft <martinkraft@gmail.com> | 2018-05-11 08:05:23 -0400 |
commit | 91557bbd978500388a11b99401783164e143a966 (patch) | |
tree | 676d6278d957df20f21d5e367d1f447ee281414e /api4/user.go | |
parent | 11c60ea41afd419036edc54b5571f26ce680c93c (diff) | |
parent | 2b27e12445ba51e1fa1ab2aceac5fcb3de66845d (diff) | |
download | chat-91557bbd978500388a11b99401783164e143a966.tar.gz chat-91557bbd978500388a11b99401783164e143a966.tar.bz2 chat-91557bbd978500388a11b99401783164e143a966.zip |
Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2
Diffstat (limited to 'api4/user.go')
-rw-r--r-- | api4/user.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/api4/user.go b/api4/user.go index 897c49ad1..2a539a551 100644 --- a/api4/user.go +++ b/api4/user.go @@ -771,7 +771,7 @@ func checkUserMfa(c *Context, w http.ResponseWriter, r *http.Request) { return } - if user, err := c.App.GetUserForLogin(loginId, false); err == nil { + if user, err := c.App.GetUserForLogin("", loginId); err == nil { resp["mfa_required"] = user.MfaActive } @@ -943,7 +943,7 @@ func login(c *Context, w http.ResponseWriter, r *http.Request) { ldapOnly := props["ldap_only"] == "true" c.LogAuditWithUserId(id, "attempt - 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.LogAuditWithUserId(id, "failure - login_id="+loginId) c.Err = err @@ -1167,7 +1167,7 @@ func sendVerificationEmail(c *Context, w http.ResponseWriter, r *http.Request) { return } - user, err := c.App.GetUserForLogin(email, false) + user, err := c.App.GetUserForLogin("", email) if err != nil { // Don't want to leak whether the email is valid or not ReturnStatusOK(w) @@ -1205,7 +1205,7 @@ func switchAccountType(c *Context, w http.ResponseWriter, r *http.Request) { link, err = c.App.SwitchOAuthToEmail(switchRequest.Email, switchRequest.NewPassword, c.Session.UserId) } else if switchRequest.EmailToLdap() { - link, err = c.App.SwitchEmailToLdap(switchRequest.Email, switchRequest.Password, switchRequest.MfaCode, switchRequest.LdapId, switchRequest.NewPassword) + link, err = c.App.SwitchEmailToLdap(switchRequest.Email, switchRequest.Password, switchRequest.MfaCode, switchRequest.LdapLoginId, switchRequest.NewPassword) } else if switchRequest.LdapToEmail() { link, err = c.App.SwitchLdapToEmail(switchRequest.Password, switchRequest.MfaCode, switchRequest.Email, switchRequest.NewPassword) } else { |