<?php
/**
* Cron entry for trial checking
*
* @package XenForo_Trial
*/
class XenForo_CronEntry_Trial
{
/**
* Runs the cron-based check for trial termination
*/
public static function runTrialCheck()
{
/* @var $userModel XenForo_Model_User */
$userModel = XenForo_Model::create('XenForo_Model_User');
// Assuming that 13 is the group number for your trial members
// Assuming that 'timeinseconds' is a real number
$users = $userModel->getUsers(array(
'secondary_goup_ids' => 13,
'register_date' => array('>', XenForo_Application::$time - timeinseconds)
));
foreach ($users AS $user)
{
// Not too sure on how to set fields...
$user['secondary_group_ids'] = null;
}
}
}