Skip to content

Commit

Permalink
[#2839] Fix bug with failed login count not being updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaun McCormick committed Nov 22, 2010
1 parent 77c27f2 commit 99fd452
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/docs/changelog.txt
Expand Up @@ -2,6 +2,7 @@
This file shows the changes in recent releases of MODx. The most current release is usually the
development release, and is only shown to give an idea of what's currently in the pipeline.

- [#2839] Fix bug with failed login count not being updated
- Add ability to view permissions inherited when viewing an ACL row in a grid
- [#2834] Fix issue where constraint class was not set on new FC rules
- [#2819] Fix issue with FC rules and execution order due to setting default templates, constraints
Expand Down
6 changes: 5 additions & 1 deletion core/model/modx/processors/security/login.php
Expand Up @@ -136,7 +136,11 @@
/* check if plugin authenticated the user */
if (!$rt || (is_array($rt) && !in_array(true, $rt))) {
/* check user password - local authentication */
if($user->get('password') != md5($givenPassword)) {
if ($user->get('password') != md5($givenPassword)) {
$flc = ((int)$up->get('failedlogincount'))+1;
$up->set('failedlogincount',$flc);
$up->save();

return $modx->error->failure($modx->lexicon('login_username_password_incorrect'));
}
}
Expand Down

0 comments on commit 99fd452

Please sign in to comment.