[eluser]tedroche[/eluser]
I tweaked on the purge_na function in models/tank_auth/users.php, as I am using a database other than MySQL and the function UNIX_TIMESTAMP is MySQL-specific. Rather than depending on a database-specific function, I use a PHP function to pass an ISO-8601 datetime format, with the timezone correction removed (MS SQL doesn't like that part of the 'standard' - grr).
function purge_na($expire_period = 172800)
{
$this->db->where('activated', 0);
# MySQL Specific: $this->db->where('UNIX_TIMESTAMP(created) <', time() - $expire_period);
# now creates a generic sql like WHERE created < '2011-06-15T06:15:58'
$this->db->where('created <', substr(date('c',time() - $expire_period),0,19));
$this->db->delete($this->table_name);
}
I use the same logic in can_reset_password() and reset_password() and it appears to be working fine.