Currently the script uses the field level_id to check if the user is premium and the background task downgrade_account.cron.php is supposed to run every day at midnight downgrading accounts.
The problem is that if the user account expires at 0:10 he will have 1 day free because the task will not execute until the next day. You can set the task to run every hour, but the users will still have up to 1 extra hour. I didn't test this task in a site with thousands of active users so I can't tell the performance impacts of running it every hour.
The ideal is to use the paidExpiryDate field to check if the user is premium. The level_id may still exists to identify admin and other types of users.
The problem is that if the user account expires at 0:10 he will have 1 day free because the task will not execute until the next day. You can set the task to run every hour, but the users will still have up to 1 extra hour. I didn't test this task in a site with thousands of active users so I can't tell the performance impacts of running it every hour.
The ideal is to use the paidExpiryDate field to check if the user is premium. The level_id may still exists to identify admin and other types of users.