Added the checknonusedpasswords.php script
This script checks for passwords that were not accessed for a while.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user