1 package FS::Cron::expire_user_pref;
3 use vars qw( @ISA @EXPORT_OK);
8 @EXPORT_OK = qw( expire_user_pref );
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;
16 dbh->commit or die dbh->errstr if $FS::UID::AutoCommit