Updated to take their configurable parameters from the config file.

This commit is contained in:
JT Smith 2002-10-13 19:55:39 +00:00
parent 55108689b4
commit 0f2350d4c5
5 changed files with 46 additions and 45 deletions

View file

@ -1,7 +1,5 @@
package Hourly::CleanLoginHistory;
my $ageToDelete = 90; # in days, time to wait before deleting from login log
#-------------------------------------------------------------------
# WebGUI is Copyright 2001-2002 Plain Black LLC.
#-------------------------------------------------------------------
@ -19,7 +17,10 @@ use WebGUI::SQL;
#-----------------------------------------
sub process {
WebGUI::SQL->write("delete from userLoginLog where timeStamp<".(time()-(86400*$ageToDelete)));
if ($session{config}{CleanLoginHistory_ageToDelete}) {
WebGUI::SQL->write("delete from userLoginLog
where timeStamp < ".(time()-(86400*$session{config}{CleanLoginHistory_ageToDelete})));
}
}
1;