diff --git a/api/user.go b/api/user.go index 278199f7ca..5fcea3367d 100644 --- a/api/user.go +++ b/api/user.go @@ -1723,7 +1723,7 @@ func sendPasswordReset(c *Context, w http.ResponseWriter, r *http.Request) { var user *model.User if result := <-Srv.Store.User().GetByEmail(email); result.Err != nil { - c.Err = model.NewLocAppError("sendPasswordReset", "api.user.send_password_reset.find.app_error", nil, "email="+email) + w.Write([]byte(model.MapToJson(props))) return } else { user = result.Data.(*model.User) diff --git a/api/user_test.go b/api/user_test.go index 0d67030d24..bc804ca11a 100644 --- a/api/user_test.go +++ b/api/user_test.go @@ -1256,18 +1256,23 @@ func TestSendPasswordReset(t *testing.T) { LinkUserToTeam(user, team) store.Must(Srv.Store.User().VerifyEmail(user.Id)) - if _, err := Client.SendPasswordReset(user.Email); err != nil { + if result, err := Client.SendPasswordReset(user.Email); err != nil { t.Fatal(err) + } else { + resp := result.Data.(map[string]string) + if resp["email"] != user.Email { + t.Fatal("wrong email") + } + } + + if _, err := Client.SendPasswordReset("junk@junk.com"); err != nil { + t.Fatal("Should have errored - bad email") } if _, err := Client.SendPasswordReset(""); err == nil { t.Fatal("Should have errored - no email") } - if _, err := Client.SendPasswordReset("junk@junk.com"); err == nil { - t.Fatal("Should have errored - bad email") - } - authData := model.NewId() user2 := &model.User{Email: strings.ToLower(model.NewId()) + "success+test@simulator.amazonses.com", Nickname: "Corey Hulen", AuthData: &authData, AuthService: "random"} user2 = Client.Must(Client.CreateUser(user2, "")).Data.(*model.User) diff --git a/webapp/components/password_reset_send_link.jsx b/webapp/components/password_reset_send_link.jsx index 18741b8162..1cd5328558 100644 --- a/webapp/components/password_reset_send_link.jsx +++ b/webapp/components/password_reset_send_link.jsx @@ -52,14 +52,14 @@ class PasswordResetSendLink extends React.Component {
) diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json index f9d91e8e02..ba2afcce8e 100644 --- a/webapp/i18n/en.json +++ b/webapp/i18n/en.json @@ -1558,7 +1558,7 @@ "password_send.description": "To reset your password, enter the email address you used to sign up", "password_send.email": "Email", "password_send.error": "Please enter a valid email address.", - "password_send.link": "

A password reset link has been sent to {email}

", + "password_send.link": "If the account exists, a password reset email will be sent to:
{email}

", "password_send.reset": "Reset my password", "password_send.title": "Password Reset", "pdf_preview.max_pages": "Download to read more pages", diff --git a/webapp/sass/routes/_signup.scss b/webapp/sass/routes/_signup.scss index d9aa171a98..30e80cccb5 100644 --- a/webapp/sass/routes/_signup.scss +++ b/webapp/sass/routes/_signup.scss @@ -13,7 +13,7 @@ .signup-team__container { margin: 0 auto; - max-width: 380px; + max-width: 400px; padding: 100px 0 50px; position: relative;