]> git.mxchange.org Git - friendica-addons.git/blobdiff - testdrive/testdrive.php
Merge pull request #451 from annando/emailer
[friendica-addons.git] / testdrive / testdrive.php
index fc53bab8c9650677a868bc604f9f7ded9276cd4c..9c1a0c044514f56884de0f800ca91b1ec3c5a85e 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 use Friendica\Core\Config;
+use Friendica\Model\User;
 
 
 function testdrive_install() {
@@ -79,12 +80,10 @@ function testdrive_cron($a,$b) {
 
        $r = q("select * from user where account_expired = 1 and account_expires_on < UTC_TIMESTAMP() - INTERVAL 5 DAY ");
        if(count($r)) {
-               require_once('include/Contact.php');
-               foreach($r as $rr)
-                       user_remove($rr['uid']);
-
+               foreach($r as $rr) {
+                       User::remove($rr['uid']);
+               }
        }
-
 }
 
 function testdrive_enotify(&$a, &$b) {