Daisy Di
2012-Jan-05 09:47 UTC
lock the sign in account when login failed more than 5 times
Hi all i have two table,member and failed_times,the member table is designed by customer which i cant modify anything, but the failed_times is created by myself.the columns in the failed_times are id,mbr_id,times, now i can calculate the login failed times and save it into failed_times table, but i am not sure how to lock the sign in account that user can not try to login again. Any good idea? thanks. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2012-Jan-05 10:02 UTC
Re: lock the sign in account when login failed more than 5 times
On 5 January 2012 09:47, Daisy Di <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi all > i have two table,member and failed_times,the member table is designed by > customer which i cant modify anything, but the failed_times is created > by myself.the columns in the failed_times are id,mbr_id,times, now i can > calculate the login failed times and save it into failed_times table, > but i am not sure how to lock the sign in account that user can not try > to login again. > Any good idea?In the login code just test the count and prevent login if necessary. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Daisy Di
2012-Jan-06 01:22 UTC
Re: lock the sign in account when login failed more than 5 times
Colin Law wrote in post #1039527:> On 5 January 2012 09:47, Daisy Di <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> Hi all >> i have two table,member and failed_times,the member table is designed by >> customer which i cant modify anything, but the failed_times is created >> by myself.the columns in the failed_times are id,mbr_id,times, now i can >> calculate the login failed times and save it into failed_times table, >> but i am not sure how to lock the sign in account that user can not try >> to login again. >> Any good idea? > > In the login code just test the count and prevent login if necessary. > > ColinHi Colin, How to prevent login? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2012-Jan-06 08:08 UTC
Re: Re: lock the sign in account when login failed more than 5 times
On 6 January 2012 01:22, Daisy Di <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Colin Law wrote in post #1039527: >> On 5 January 2012 09:47, Daisy Di <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>> Hi all >>> i have two table,member and failed_times,the member table is designed by >>> customer which i cant modify anything, but the failed_times is created >>> by myself.the columns in the failed_times are id,mbr_id,times, now i can >>> calculate the login failed times and save it into failed_times table, >>> but i am not sure how to lock the sign in account that user can not try >>> to login again. >>> Any good idea? >> >> In the login code just test the count and prevent login if necessary. >> >> Colin > > Hi Colin, > > How to prevent login?Presumably you have some code somewhere that handles the login. In that code test your count. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Christian Bautista
2012-Jan-06 08:33 UTC
Re: lock the sign in account when login failed more than 5 times
If you are just trying to restrict or prevent login after five times of failure its really no need to create a database for it. but use cookies and put some values in it and set the time when it will expire. after that a if statement that will redirect the user into other page or just use a disable attribute of a form. but since you use table for it. maybe to make sure that even if the client clear its cache the user cant login again. you said you already have the times of failure then just put a if statement for it. On Jan 6, 4:08 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 6 January 2012 01:22, Daisy Di <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > > > > > > > > > > > Colin Law wrote in post #1039527: > >> On 5 January 2012 09:47, Daisy Di <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: > >>> Hi all > >>> i have two table,member and failed_times,the member table is designed by > >>> customer which i cant modify anything, but the failed_times is created > >>> by myself.the columns in the failed_times are id,mbr_id,times, now i can > >>> calculate the login failed times and save it into failed_times table, > >>> but i am not sure how to lock the sign in account that user can not try > >>> to login again. > >>> Any good idea? > > >> In the login code just test the count and prevent login if necessary. > > >> Colin > > > Hi Colin, > > > How to prevent login? > > Presumably you have some code somewhere that handles the login. In > that code test your count. > > Colin-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.