Skip to content

Commit c8dcf9e

Browse files
author
AJ ONeal
committed
properly label account recovery instead of reset password
1 parent 5acf2ce commit c8dcf9e

File tree

5 files changed

+14
-16
lines changed

5 files changed

+14
-16
lines changed

models/mail.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func SendActivateAccountMail(c *macaron.Context, u *User) {
7373

7474
// SendResetPasswordMail sends a password reset mail to the user
7575
func SendResetPasswordMail(c *macaron.Context, u *User) {
76-
SendUserMail(c, u, mailAuthResetPassword, u.GenerateActivateCode(), c.Tr("mail.reset_password"), "reset password")
76+
SendUserMail(c, u, mailAuthResetPassword, u.GenerateActivateCode(), c.Tr("mail.reset_password"), "recover account")
7777
}
7878

7979
// SendActivateEmailMail sends confirmation email to confirm new email address

options/locale/locale_en-US.ini

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ sign_up_successful = Account was successfully created.
207207
confirmation_mail_sent_prompt = A new confirmation email has been sent to <b>%s</b>. Please check your inbox within the next %s to complete the registration process.
208208
must_change_password = Update your password
209209
allow_password_change = Require user to change password (recommended)
210-
reset_password_mail_sent_prompt = A confirmation email has been sent to <b>%s</b>. Please check your inbox within the next %s to complete the password reset process.
210+
reset_password_mail_sent_prompt = A confirmation email has been sent to <b>%s</b>. Please check your inbox within the next %s to complete the account recovery process.
211211
active_your_account = Activate Your Account
212212
account_activated = Account has been activated
213213
prohibit_login = Sign In Prohibited
@@ -216,11 +216,11 @@ resent_limit_prompt = You have already requested an activation email recently. P
216216
has_unconfirmed_mail = Hi %s, you have an unconfirmed email address (<b>%s</b>). If you haven't received a confirmation email or need to resend a new one, please click on the button below.
217217
resend_mail = Click here to resend your activation email
218218
email_not_associate = The email address is not associated with any account.
219-
send_reset_mail = Click here to resend your password reset email
220-
reset_password = Reset Your Password
219+
send_reset_mail = Click here to resend your account recovery email
220+
reset_password = Account Recovery
221221
invalid_code = Your confirmation code is invalid or has expired.
222-
reset_password_helper = Reset Password
223-
reset_password_wrong_user = You are signed in as %s, but the password reset link is for %s
222+
reset_password_helper = Recover Account
223+
reset_password_wrong_user = You are signed in as %s, but the account recovery link is for %s
224224
password_too_short = Password length cannot be less than %d characters.
225225
non_local_account = Non-local users can not update their password through the Gitea web interface.
226226
verify = Verify
@@ -237,12 +237,12 @@ openid_connect_desc = The chosen OpenID URI is unknown. Associate it with a new
237237
openid_register_title = Create new account
238238
openid_register_desc = The chosen OpenID URI is unknown. Associate it with a new account here.
239239
openid_signin_desc = Enter your OpenID URI. For example: https://anne.me, bob.openid.org.cn or gnusocial.net/carry.
240-
disable_forgot_password_mail = Password reset is disabled. Please contact your site administrator.
240+
disable_forgot_password_mail = Account recovery is disabled. Please contact your site administrator.
241241
242242
[mail]
243243
activate_account = Please activate your account
244244
activate_email = Verify your email address
245-
reset_password = Reset your password
245+
reset_password = Recover your account
246246
register_success = Registration successful
247247
register_notify = Welcome to Gitea
248248
@@ -1560,7 +1560,7 @@ config.mail_notify = Enable Email Notifications
15601560
config.disable_key_size_check = Disable Minimum Key Size Check
15611561
config.enable_captcha = Enable CAPTCHA
15621562
config.active_code_lives = Active Code Lives
1563-
config.reset_password_code_lives = Reset Password Code Expiry Time
1563+
config.reset_password_code_lives = Recover Account Code Expiry Time
15641564
config.default_keep_email_private = Hide Email Addresses by Default
15651565
config.default_allow_create_organization = Allow Creation of Organizations by Default
15661566
config.enable_timetracking = Enable Time Tracking

routers/routes/routes.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,6 @@ func RegisterRoutes(m *macaron.Macaron) {
185185
m.Get("/^:type(issues|pulls)$", reqSignIn, user.Issues)
186186

187187
// ***** START: User *****
188-
m.Group("/user", func() {
189-
m.Get("/reset_password", user.ResetPasswd)
190-
m.Post("/reset_password", user.ResetPasswdPost)
191-
})
192188
m.Group("/user", func() {
193189
m.Get("/login", user.SignIn)
194190
m.Post("/login", bindIgnErr(auth.SignInForm{}), user.SignInPost)
@@ -298,6 +294,8 @@ func RegisterRoutes(m *macaron.Macaron) {
298294
m.Any("/activate", user.Activate)
299295
m.Any("/activate_email", user.ActivateEmail)
300296
m.Get("/email2user", user.Email2User)
297+
m.Get("/recover_account", user.ResetPasswd)
298+
m.Post("/recover_account", user.ResetPasswdPost)
301299
m.Get("/forgot_password", user.ForgotPasswd)
302300
m.Post("/forgot_password", user.ForgotPasswdPost)
303301
m.Get("/logout", user.SignOut)

routers/user/auth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ func commonResetPassword(ctx *context.Context) *models.User {
11721172
return u
11731173
}
11741174

1175-
// ResetPasswd render the reset password page
1175+
// ResetPasswd render the account recovery page
11761176
func ResetPasswd(ctx *context.Context) {
11771177
ctx.Data["IsResetForm"] = true
11781178

@@ -1181,7 +1181,7 @@ func ResetPasswd(ctx *context.Context) {
11811181
ctx.HTML(200, tplResetPassword)
11821182
}
11831183

1184-
// ResetPasswdPost response from reset password request
1184+
// ResetPasswdPost response from account recovery request
11851185
func ResetPasswdPost(ctx *context.Context) {
11861186
u := commonResetPassword(ctx)
11871187

templates/mail/auth/reset_passwd.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<body>
99
<p>Hi <b>{{.Username}}</b>,</p>
1010
<p>Please click the following link to reset your password within <b>{{.ResetPwdCodeLives}}</b>:</p>
11-
<p><a href="{{AppUrl}}user/reset_password?code={{.Code}}">{{AppUrl}}user/reset_password?code={{.Code}}</a></p>
11+
<p><a href="{{AppUrl}}user/recover_account?code={{.Code}}">{{AppUrl}}user/recover_account?code={{.Code}}</a></p>
1212
<p>Not working? Try copying and pasting it to your browser.</p>
1313
<p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p>
1414
</body>

0 commit comments

Comments
 (0)