Jump to content

SessionLoginThrottle


bwakad
 Share

Recommended Posts

Error: Exception: Please wait at least 50 seconds before attempting another login. (in C:\xampp\htdocs\... etc.)

As I read through the forum I see it is to stop attemps of brute forcing which is good. But I would NOT like to display this message with the path and all on the front end.

So, how to stop it from displaying in front end (without turning it off)?

And, in case of login, I was thinking of using something as a counter:

Login (attempt 1)..

try and failed

Login (attempt 2)..

try and failed

Login (attempt 3)..

try and failed, redirect to recover login credentials

But what are the conditions. Is this based on a certain amount within a certain time frame? Or just in between logins a certain time?

Link to comment
Share on other sites

Got it (must be halfblind). Sorry for that. It now displays nicely in a container at top of the form.

        try{            
            $u = $session->login($username, $password);
            if($u && $u->id) {
                $session->redirect("/members");
            }
        } catch(Exception $e) {
            $errorMessage .= "<li><b>" . $e->getMessage() . "</b></li>";
        }
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...