Jump to content

SessionLoginThrottle and $session->login


apeisa
 Share

Recommended Posts

I did hit my head into wall for few hours because of this. I did build custom login and was getting very strange results (sometimes it worked just fine, other times not so nicely). Finally I did figure out the problem and it was SessionLoginThrottle. It is pretty hard one to find out, since $session->login($username, $pass) returns just false, even if username and password are right (but SessionLoginThrottle comes into play).

Not sure what is best way to handle this? Maybe just information on cheatsheet, that even though username and password are right, there might be other things that prevents login. Or then - should sessionLoginThrottle be activated by default only on main admin login and let custom logins use it if they want?

Link to comment
Share on other sites

I see what you mean. Sorry for the confusion this may have caused. I will think more here about how to handle this. I don't want it interfering with API usage such as yours, but do want it to be able to still work with any login form (whether ProcessLogin or a custom one). Initially I'm thinking maybe I should just have it throw an Exception rather than a $this->error(). Errors communicated via $this->error() require something to report them (like the admin template), so this could be hard to find in API usage. Whereas an Exception would be hard to miss. Beyond this, I think a way to disable SessionLoginThrottle at runtime would be worthwhile for a case like this too.

  • Like 1
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...