重新发送确认电子邮件问题
我想提供一种方法来向最近在我的网站上注册帐户的用户“重新发送确认”电子邮件。
查找他们的信息并确保请求来自他们的好方法是什么?
他们无需确认电子邮件即可登录。我想我会使用 jquery.post
将他们的 id 发送到一个页面,该页面会查找他们的电子邮件并重新发送确认。这足够安全吗?
如果我在发送 jquery.post
的页面中设置了会话,会话变量是否会传递到我 post
的页面?
I'd like to offer a way for me to "resend confirmation" email to users who have recently signed up for accounts at my site.
What is a good way to look up their info and make sure the request came from them?
They are able to log in without confirming their email. I was thinking I would use jquery.post
to send their id to a page, which looks up their email and resends the confirmation. Is this secure enough?
If I have a session set in one page where I am sending a jquery.post
from, will the session variables be passed to the page I post
to?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当发送 jQuery post 时,将传递标识用户会话的 cookie,这将自动填充 $_SESSION。
确保将他们的用户 ID 存储在会话中,而不是作为用户可能篡改的单独 cookie。
The cookie identifying the user's session will be passed along when the jQuery post is sent which will automatically populate $_SESSION.
Make sure you store their user ID in their session, not as a separate cookie that the user could tamper with.