Bugzilla – Attachment 62889 Details for
Bug 18314
Account lockout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18314: Fix reset number of login attempts on login success
Bug-18314-Fix-reset-number-of-login-attempts-on-lo.patch (text/plain), 1.01 KB, created by
Nick Clemens (kidclamp)
on 2017-04-28 20:50:08 UTC
(
hide
)
Description:
Bug 18314: Fix reset number of login attempts on login success
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-04-28 20:50:08 UTC
Size:
1.01 KB
patch
obsolete
>From 5b006522e51ac0809cd66d5eef08865743c09d82 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 28 Apr 2017 17:14:53 -0300 >Subject: [PATCH] Bug 18314: Fix reset number of login attempts on login > success > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > C4/Auth.pm | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 7750f01..c77f9a8 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1813,8 +1813,12 @@ sub checkpw { > > if ( $return[0] == 0 ) { > $patron->update({ login_attempts => $patron->login_attempts + 1 }) if $patron; >- } elsif ( $return[1] == 1 ) { >- $patron->update({ login_attempts => 0 })->store if $patron; >+ } elsif ( $return[0] == 1 ) { >+ if ( $patron ) { >+ # FIXME Koha::Object->update should return a Koha::Object to allow chaining >+ $patron->update({ login_attempts => 0 }); >+ $patron->store; >+ } > } > return @return; > } >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18314
:
61630
|
61631
|
61632
|
61633
|
61634
|
62453
|
62454
|
62455
|
62456
|
62457
|
62872
|
62873
|
62874
|
62875
|
62876
|
62877
|
62878
|
62884
|
62885
|
62886
|
62887
|
62888
| 62889 |
62890
|
62891