简体   繁体   English

使用 fosuserbundle、symfony2 重置密码时链接收到错误

[英]link received error when resetting password with fosuserbundle, symfony2

I am using Symfony2 and Fosuserbundle on my website.我在我的网站上使用 Symfony2 和 Fosuserbundle。 But I have a problem when I want to reset my password.但是当我想重置密码时遇到了问题。

-- When I go to the /resetting/request page I first put my email. -- 当我转到 /resetting/request 页面时,我首先输入了我的电子邮件。 I receive an email with a link : http://xxxx-xxxx.c9users.io/web/app_dev.php/resetting/reset/UmOqQME0hnRgsXQ2RVjJ02TvogHyabs9L_YHiNnkIfA我收到一封带有链接的电子邮件: http : //xxxx-xxxx.c9users.io/web/app_dev.php/resetting/reset/UmOqQME0hnRgsXQ2RVjJ02TvogHyabs9L_YHiNnkIfA

--When I click at this link I see a form for /resetting/request not /resetting/reset/{token}. --当我点击这个链接时,我看到了一个 /resetting/request 的表格,而不是 /resetting/reset/{token}。

knowing that confirmation link for registration It works well.知道注册的确认链接效果很好。

thanks,谢谢,

Have you made any modifications to your app/config/config.yml file?您是否对 app/config/config.yml 文件进行了任何修改?

Sounds like the timer for your token_ttl is on 0 or too small so the token is expired before you have a chance to reset the password.听起来您的 token_ttl 的计时器设置为 0 或太小,因此在您有机会重置密码之前令牌已过期。

app/config/config.yml应用程序/配置/config.yml

fos_user:
    resetting:
       token_ttl: 0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM