diff options
author | ivan <ivan> | 2007-08-01 22:26:52 +0000 |
---|---|---|
committer | ivan <ivan> | 2007-08-01 22:26:52 +0000 |
commit | eb4ff7f73c5d4bdf74a3472448b5a195598ff4cd (patch) | |
tree | bb38241e8c865c3bca861da7749071feeadd2b5b /FS/FS/Cron/expire_user_pref.pm | |
parent | 32b5d3a31f112a381f0a15ac5e3a2204242f3405 (diff) |
event refactor, landing on HEAD!
Diffstat (limited to 'FS/FS/Cron/expire_user_pref.pm')
-rw-r--r-- | FS/FS/Cron/expire_user_pref.pm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/FS/FS/Cron/expire_user_pref.pm b/FS/FS/Cron/expire_user_pref.pm new file mode 100644 index 000000000..7ab73d280 --- /dev/null +++ b/FS/FS/Cron/expire_user_pref.pm @@ -0,0 +1,17 @@ +package FS::Cron::expire_user_pref; + +use vars qw( @ISA @EXPORT_OK); +use Exporter; +use FS::UID qw(dbh); + +@ISA = qw( Exporter ); +@EXPORT_OK = qw( expire_user_pref ); + +sub expire_user_pref { + my $sql = "DELETE FROM access_user_pref WHERE expiration IS NOT NULL". + " AND expiration < ?"; + my $sth = dbh->prepare($sql) or die dbh->errstr; + $sth->execute(time) or die $sth->errstr; +} + +1; |