如果他没有使用确认码确认他的电子邮件,如何限制用户 [英] How to restrict user if he didn't confirm his email using confirmationcode

查看:101
本文介绍了如果他没有使用确认码确认他的电子邮件,如何限制用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello all



i正在开发社交媒体网站,当用户注册完成后,用户可以获得他的邮件确认码

用于他的邮件确认。如果用户没有确认他的邮件确认,他可以用他的crendential(emailid,密码)登录

最多6天..但是如果用户可以使用他的凭证登录6天后,我们会限制用户他不能登录网站,我们

我们想要显示首先你的电子邮件这样的消息。

我们如何使用web.config文件或cs文件来执行此功能。请告诉我任何一个



谢谢

Hello all

i am developing social media website when user registration is completed the user get to his mail confirmationcode
for his mail confirmation. if user didn''t confirm his mail confirmation he can login with his crendential(emailid, password)
upto 6 days.. But after 6 days if user can login with his crendentials , we restrict the user he can''t login the website, we
we want to display the message like "first u conifrm your email".
How we will do this functionality using web.config file or cs file. Please tell me any one

Thanks

推荐答案

作为 Sergey Alexandrovich Kryukov 说它很危险。



如果你必须实现那么我的建议是在登录表或其他表中存储第一个登录日期,每次检查是否如果不是,则用户输入他的确认码,然后检查第一个登录日期和当前日期之间的日期差异。 6然后把你的消息。



一旦用户把他的确认代码设置第一个登录日期变为null,并且如果第一个登录日期为null则允许用户没有任何检查。
As Sergey Alexandrovich Kryukov said its dangerous.

If you have to implement that then My advice will be to store first log in date in Log in table or some other table and each time check whether the user put his confirmation code or not if not then check date diff between first log in date and current date if > 6 then put your message.

Once user put his confirmation code set first log in date to null, and if first log in date is null then allow user with out any checking.


据我所知,注册到您的网站后,用户必须在6天内和6天后确认他的电子邮件ID(即使用户确认了他的电子邮件ID),用户将无法登录。



如果我的确比您要做的更正,您必须在注册日期<6天检查并在数据库表中维护一个类似( isVerified )的标志,当用户确认他的电子邮件ID时,您将更新该标志。





谢谢
As I understand, After registering to your website,a user must have to confirm his email id with in 6 days and after 6 days (even user is confirming his email id), user will not be able to login.

If I am correct than what you have to do is, you have to check 6 days with the registeration date and maintain a flag like (isVerified) in your database table to which you will update the same when user confirmed his email id.


Thanks


这篇关于如果他没有使用确认码确认他的电子邮件,如何限制用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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