jbroadway/elefant — Issue #67: Rate-limit login attempts with $memcache
Author: jbroadway
Created: 2012-01-18 16:30:59+00:00
State: open
Labels: feature

Can simply use this within the User model:

```php
$key = '_login_attempt_' . session_id ();
$memcache->add ($key, 0, false, $appconf['User']['block_attempts_for']);
$count = $memcache->increment ($key);
if ($count > $appconf['User']['attempt_limit']) {
return false;
}
```

Then we could simply add `attempt_limit` and `block_attempts_for` to the user app's config.