Added the checknonusedpasswords.php script

This script checks for passwords that were not accessed for a while.
This commit is contained in:
Gergely Polonkai (W00d5t0ck)
2011-02-22 15:36:20 +01:00
parent 1ceaae308f
commit a850066271
2 changed files with 32 additions and 0 deletions

View File

@@ -410,6 +410,14 @@ if (!class_exists('PWSdb'))
return $sth->fetchAll();
}
function getInactivePasswords($inactiveInterval)
{
$sth = $this->prepare('SELECT id, short, long, username, groups, lastaccess FROM passwords WHERE datetime(lastaccess, ?) < datetime(\'now\')');
$sth->execute(array($inactiveInterval));
return $sth->fetchAll();
}
}
}