diff --git a/models/mail.go b/models/mail.go index 6b69e7b2a..eef70daad 100644 --- a/models/mail.go +++ b/models/mail.go @@ -73,7 +73,7 @@ func SendActivateAccountMail(c *macaron.Context, u *User) { // SendResetPasswordMail sends a password reset mail to the user func SendResetPasswordMail(c *macaron.Context, u *User) { - SendUserMail(c, u, mailAuthResetPassword, u.GenerateActivateCode(), c.Tr("mail.reset_password"), "reset password") + SendUserMail(c, u, mailAuthResetPassword, u.GenerateActivateCode(), c.Tr("mail.reset_password"), "recover account") } // SendActivateEmailMail sends confirmation email to confirm new email address diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 14546dcb2..b9f0b1e10 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -200,18 +200,19 @@ forgot_password_title= Forgot Password forgot_password = Forgot password? sign_up_now = Need an account? Register now. confirmation_mail_sent_prompt = A new confirmation email has been sent to %s. Please check your inbox within the next %s to complete the registration process. -reset_password_mail_sent_prompt = A confirmation email has been sent to %s. Please check your inbox within the next %s to complete the password reset process. +reset_password_mail_sent_prompt = A confirmation email has been sent to %s. Please check your inbox within the next %s to complete the account recovery process. active_your_account = Activate Your Account prohibit_login = Sign In Prohibited prohibit_login_desc = Your account is prohibited to sign in, please contact your site administrator. resent_limit_prompt = You have already requested an activation email recently. Please wait 3 minutes and try again. has_unconfirmed_mail = Hi %s, you have an unconfirmed email address (%s). If you haven't received a confirmation email or need to resend a new one, please click on the button below. -resend_mail = Click here to resend your activation email +resend_mail = Resend Activation Email email_not_associate = The email address is not associated with any account. -send_reset_mail = Click here to resend your password reset email -reset_password = Reset Your Password +send_reset_mail = Resend Account Recovery Email +reset_password = Account Recovery invalid_code = Your confirmation code is invalid or has expired. -reset_password_helper = Click here to reset your password +reset_password_helper = Recover Account +reset_password_wrong_user = You are signed in as %s, but the account recovery link is for %s password_too_short = Password length cannot be less than %d characters. non_local_account = Non-local users can not update their password through the Gitea web interface. verify = Verify @@ -234,12 +235,12 @@ openid_connect_desc = The chosen OpenID URI is unknown. Associate it with a new openid_register_title = Create new account openid_register_desc = The chosen OpenID URI is unknown. Associate it with a new account here. openid_signin_desc = Enter your OpenID URI. For example: https://anne.me, bob.openid.org.cn or gnusocial.net/carry. -disable_forgot_password_mail = Password reset is disabled. Please contact your site administrator. +disable_forgot_password_mail = Account recovery is disabled. Please contact your site administrator. [mail] activate_account = Please activate your account activate_email = Verify your email address -reset_password = Reset your password +reset_password = Recover your account register_success = Registration successful register_notify = Welcome to Gitea @@ -1497,7 +1498,7 @@ config.mail_notify = Enable Email Notifications config.disable_key_size_check = Disable Minimum Key Size Check config.enable_captcha = Enable CAPTCHA config.active_code_lives = Active Code Lives -config.reset_password_code_lives = Reset Password Code Expiry Time +config.reset_password_code_lives = Recover Account Code Expiry Time config.default_keep_email_private = Hide Email Addresses by Default config.default_allow_create_organization = Allow Creation of Organizations by Default config.enable_timetracking = Enable Time Tracking diff --git a/routers/routes/routes.go b/routers/routes/routes.go index f5be1be19..547c9c6fd 100644 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -184,10 +184,6 @@ func RegisterRoutes(m *macaron.Macaron) { m.Get("/^:type(issues|pulls)$", reqSignIn, user.Issues) // ***** START: User ***** - m.Group("/user", func() { - m.Get("/reset_password", user.ResetPasswd) - m.Post("/reset_password", user.ResetPasswdPost) - }) m.Group("/user", func() { m.Get("/login", user.SignIn) m.Post("/login", bindIgnErr(auth.SignInForm{}), user.SignInPost) @@ -295,6 +291,8 @@ func RegisterRoutes(m *macaron.Macaron) { m.Any("/activate", user.Activate) m.Any("/activate_email", user.ActivateEmail) m.Get("/email2user", user.Email2User) + m.Get("/recover_account", user.ResetPasswd) + m.Post("/recover_account", user.ResetPasswdPost) m.Get("/forgot_password", user.ForgotPasswd) m.Post("/forgot_password", user.ForgotPasswdPost) m.Get("/logout", user.SignOut) diff --git a/routers/user/auth.go b/routers/user/auth.go index 9b59725b5..80a88269b 100644 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -1144,7 +1144,7 @@ func ForgotPasswdPost(ctx *context.Context) { ctx.HTML(200, tplForgotPassword) } -// ResetPasswd render the reset password page +// ResetPasswd render the account recovery page func ResetPasswd(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("auth.reset_password") @@ -1160,7 +1160,7 @@ func ResetPasswd(ctx *context.Context) { ctx.HTML(200, tplResetPassword) } -// ResetPasswdPost response from reset password request +// ResetPasswdPost response from account recovery request func ResetPasswdPost(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("auth.reset_password") diff --git a/templates/mail/auth/reset_passwd.tmpl b/templates/mail/auth/reset_passwd.tmpl index ea233d8f5..513a344fe 100644 --- a/templates/mail/auth/reset_passwd.tmpl +++ b/templates/mail/auth/reset_passwd.tmpl @@ -8,7 +8,7 @@
Hi {{.Username}},
Please click the following link to reset your password within {{.ResetPwdCodeLives}}:
-{{AppUrl}}user/reset_password?code={{.Code}}
+{{AppUrl}}user/recover_account?code={{.Code}}
Not working? Try copying and pasting it to your browser.