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@googlegroups.com.
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.

Search Discussions

  • Colin Law at Jan 5, 2012 at 10:03 am

    On 5 January 2012 09:47, Daisy Di 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@googlegroups.com.
    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.
  • Daisy Di at Jan 6, 2012 at 1:22 am

    Colin Law wrote in post #1039527:
    On 5 January 2012 09:47, Daisy Di 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?

    --
    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@googlegroups.com.
    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.
  • Colin Law at Jan 6, 2012 at 8:09 am

    On 6 January 2012 01:22, Daisy Di wrote:
    Colin Law wrote in post #1039527:
    On 5 January 2012 09:47, Daisy Di 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@googlegroups.com.
    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.
  • Christian Bautista at Jan 6, 2012 at 11:55 am
    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 wrote:
    On 6 January 2012 01:22, Daisy Di wrote:








    Colin Law wrote in post #1039527:
    On 5 January 2012 09:47, Daisy Di 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@googlegroups.com.
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJan 5, '12 at 9:48a
activeJan 6, '12 at 11:55a
posts5
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase