$uid = $b;
- $days = Config::get('testdrive','expiredays');
+ $days = get_config('testdrive','expiredays');
if(! $days)
return;
if(count($r)) {
foreach($r as $rr) {
- notification([
+ notification(array(
'uid' => $rr['uid'],
'type' => NOTIFY_SYSTEM,
'system_type' => 'testdrive_expire',
'source_name' => L10n::t('Administrator'),
'source_link' => $a->get_baseurl(),
'source_photo' => $a->get_baseurl() . '/images/person-80.jpg',
- ]);
+ ));
q("update user set expire_notification_sent = '%s' where uid = %d",
dbesc(DateTimeFormat::utcNow()),
$r = q("select * from user where account_expired = 1 and account_expires_on < UTC_TIMESTAMP() - INTERVAL 5 DAY ");
if(count($r)) {
- foreach($r as $rr) {
- User::remove($rr['uid']);
- }
+ require_once('include/Contact.php');
+ foreach($r as $rr)
+ user_remove($rr['uid']);
+
}
+
}
function testdrive_enotify(&$a, &$b) {