diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-07-12 10:08:54 -0400 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-07-12 10:08:54 -0400 |
commit | 128e4f984ad565297ab1c7b8921d877d3a9c8f03 (patch) | |
tree | b8d26d72db1c4310f22a40498dedb0469fa88e91 /api | |
parent | d953051c06c654116170b01d39e1855b4afdf2fb (diff) | |
download | chat-128e4f984ad565297ab1c7b8921d877d3a9c8f03.tar.gz chat-128e4f984ad565297ab1c7b8921d877d3a9c8f03.tar.bz2 chat-128e4f984ad565297ab1c7b8921d877d3a9c8f03.zip |
Letting email not validated error message through login. Changing invalid credentials error. (#3546)
Diffstat (limited to 'api')
-rw-r--r-- | api/user.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/api/user.go b/api/user.go index 84906eece..bb2f1c794 100644 --- a/api/user.go +++ b/api/user.go @@ -472,7 +472,11 @@ func login(c *Context, w http.ResponseWriter, r *http.Request) { if user, err = authenticateUser(user, password, mfaToken); err != nil { c.LogAuditWithUserId(user.Id, "failure") //c.Err = model.NewLocAppError("login", "api.user.login.invalid_credentials", nil, err.Error()) - c.Err = model.NewLocAppError("login", "api.user.login.invalid_credentials", nil, "") + if err.Id == "api.user.login.not_verified.app_error" { + c.Err = err + } else { + c.Err = model.NewLocAppError("login", "api.user.login.invalid_credentials", nil, "") + } return } |