在 Drupal 7 中更改重定向以进行密码恢复 [英] Change redirect in Drupal 7 for Password Recovery

查看:13
本文介绍了在 Drupal 7 中更改重定向以进行密码恢复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Drupal 7 中,有一种方法可以通过转到/user/password"来重置密码.如果您填写您的电子邮件地址,您应该会在收件箱中收到一封电子邮件,其中包含用于重置密码的 URL.

In Drupal 7 there is a way to reset your password by going to '/user/password'. If you fill in your email address you should get an email in your inbox with an url to reset your password.

在该页面上,您需要单击登录",然后您将被重定向到您的个人资料页面(/用户").有没有办法编辑最后一个重定向?

On that page you need to click 'login' and you get redirected to your profile page ('/user'). Is there maybe a way to edit this last redirect?

谢谢!

推荐答案

您可以在admin/config/people/accounts 中更改发送给用户的邮件内容.

You can change the content of the email sent to the user in admin/config/people/accounts.

默认内容如下:

[用户:名称],

已在 [site:name] 提出重置您帐户密码的请求.

A request to reset the password for your account has been made at [site:name].

您现在可以通过单击此链接或将其复制并粘贴到您的浏览器来登录:

You may now log in by clicking this link or copying and pasting it to your browser:

[用户:一次性登录网址]

[user:one-time-login-url]

此链接只能用于登录一次,并将引导您进入可以设置密码的页面.一天后过期,不使用什么都不会发生.

This link can only be used once to log in and will lead you to a page where you can set your password. It expires after one day and nothing will happen if it's not used.

-- [站点:名称] 团队

-- [site:name] team

如果要更改用户指向的 URL,则需要编写所有代码来处理密码恢复请求.

If you are going to change the URL to which the user is directed, you need to write all the code to handle the password recovery request.

要了解 Drupal 如何处理密码重置请求,请参阅 user_pass_reset().

To have an idea of what Drupal does to handle a request of password reset, see user_pass_reset().

这篇关于在 Drupal 7 中更改重定向以进行密码恢复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆