Permalink
Browse files

include the user id in the account lockout audit message

  • Loading branch information...
1 parent 68d44fe commit 1f3d3c27bc9e035bdd1f916fa4aab43f983010dc @tonycoz committed Mar 17, 2013
Showing with 12 additions and 4 deletions.
  1. +3 −3 site/cgi-bin/modules/BSE/Util/Lockouts.pm
  2. +9 −1 site/cgi-bin/modules/SiteUser.pm
@@ -5,7 +5,7 @@ use BSE::TB::AuditLog;
use Scalar::Util qw(blessed);
use POSIX qw(strftime);
-our $VERSION = "1.004";
+our $VERSION = "1.005";
sub check_lockouts {
my ($class, %opts) = @_;
@@ -59,7 +59,7 @@ sub check_lockouts {
function => "lockout",
level => "error",
actor => "S",
- msg => "Account locked out until $end",
+ msg => "Account '" . $user->logon . "' locked out until $end",
ip_address => $req->ip_address,
);
}
@@ -139,7 +139,7 @@ sub unlock_user {
module => $module,
function => "unlock",
level => "notice",
- msg => "Account unlocked",
+ msg => "Account '" . $user->logon . "' unlocked",
ip_address => $req->ip_address,
);
@@ -18,7 +18,7 @@ SiteUser - represent a site user (or member)
=cut
-our $VERSION = "1.011";
+our $VERSION = "1.012";
use constant MAX_UNACKED_CONF_MSGS => 3;
use constant MIN_UNACKED_CONF_GAP => 2 * 24 * 60 * 60;
@@ -1024,6 +1024,14 @@ sub lockout_type {
"S";
}
+
+# for duck-type compatibility with BSE::TB::AdminUser
+sub logon {
+ my ($self) = @_;
+
+ return $self->userId;
+}
+
=back
=cut

0 comments on commit 1f3d3c2

Please sign in to comment.