<?php

class Andy_EmailLog_CronEntry_EmailLog
{
	public static function runEmailLogPrune()
	{
		// create timestamp
		$timestamp = time() - (86400 * 31);		

		// get database
		$db = XenForo_Application::get('db');

		// delete row
		$db->query("
			DELETE FROM xf_email_log
			WHERE email_date < ?
		", $timestamp);
	}
}