Added checkinactiveusers.php script

This script checks for inactive users and lists them.
This commit is contained in:
Gergely Polonkai (W00d5t0ck)
2011-02-22 15:15:46 +01:00
parent ed41012109
commit 1ceaae308f
2 changed files with 25 additions and 0 deletions

View File

@@ -402,6 +402,14 @@ if (!class_exists('PWSdb'))
return $sth->fetchAll();
}
function getInactiveUsers($inactiveInterval)
{
$sth = $this->prepare('SELECT id, username, lastlogin, administrator FROM users WHERE datetime(lastlogin, ?) < datetime(\'now\')');
$sth->execute(array($inactiveInterval));
return $sth->fetchAll();
}
}
}