event refactor, landing on HEAD!
[freeside.git] / FS / FS / Cron / expire_user_pref.pm
1 package FS::Cron::expire_user_pref;
2
3 use vars qw( @ISA @EXPORT_OK);
4 use Exporter;
5 use FS::UID qw(dbh);
6
7 @ISA = qw( Exporter );
8 @EXPORT_OK = qw( expire_user_pref );
9
10 sub expire_user_pref {
11   my $sql = "DELETE FROM access_user_pref WHERE expiration IS NOT NULL".
12                                           " AND expiration < ?";
13   my $sth = dbh->prepare($sql) or die dbh->errstr;
14   $sth->execute(time) or die $sth->errstr;
15 }
16
17 1;