在正确的登录名中,经过三次正确的登录后,同一天将不接受 [英] In correct Login three times after that correct login will not accept the same day

查看:56
本文介绍了在正确的登录名中,经过三次正确的登录后,同一天将不接受的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我要创建一个登录页面.假设在用户名和密码文本框中输入了3次错误的信息,然后提供了正确的信息,因此我在登录当天不会接受该信息.

谢谢

解决方案

您需要获得数据库和会话的帮助,而且没有任何点击.

将用户登录点击数置于会话验证中.对于每个失败的登录增量命中计数,计数为1.如果计数器达到3,则更新数据库并放置一些指示符,表示登录失败.


USE在sqlserver中触发概念,而Checkinh用户名和密码.

鉴于您有锁定用户的逻辑,这是一种将锁定保持一天的方法.

0.在数据库中存储用户被锁定的日期/时间.
1.每当用户登录时,获取用户被锁定的日期和时间,然后从当前日期/时间中减去该日期和时间.如果< 24小时,禁止登录,否则允许.如果用户的锁定期为空,则表示用户未锁定.
2.添加一个SQL作业以检查锁定期,并清除已经为24小时的值.可能会有一些延迟(延迟几分钟),具体取决于您的设计方式.


Hi all,
I want to do a login page.Suppose in user name and password textboxs i provide wrong information three times,then after that i will provide the correct information it will not accept it for the same day when i login.

Thanks

解决方案

You need to take help of Database and Session veriable for no of hits.

Put user login hits in Session veriable. for every failed login increment hit count by 1. If counter reachs 3 update database and put some indociator, indicating login failed.


USE triggers concept in sqlserver while Checkinh username and password.


Given that you have your logic for locking out the user, here is one way to keep the lockout for a day.

0. Store in the DB the date/time the user has been locked out.
1. Whenever a user logs in, get the date and time the user has been locked out and subtract it from the current date/time. If < 24 hours, disallow login, else allow. If the lockout period of the user is empty, it means that its not lockout.
2. Add a SQL job to check the lockout periods and clear the values that are already 24 hrs. There might be some lapse on this(delays for a couple of minutes), depending on how you design it.


这篇关于在正确的登录名中,经过三次正确的登录后,同一天将不接受的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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