Skip to content

Commit 2c642c2

Browse files
committed
[ADDED] Help option
1 parent 1550553 commit 2c642c2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

scripts/validate_users.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,18 @@
88
// Include all settings and classes
99
require_once('shared.inc.php');
1010

11-
$options = getopt("d:a");
11+
$options = getopt("d:n:ah");
1212
isset($options['d']) ? $timeLimitInDays = (int)$options['d'] : $timeLimitInDays = 90;
1313
isset($options['a']) ? $allUsers = true : $allUsers = false;
14-
$notifyStaleUsers = False;
14+
isset($options['n']) ? $notifyStaleUsers = true : $notifyStaleUsers = false;
15+
if (isset($options['h'])) {
16+
echo "Usage " . basename($argv[0]) . " [-d #] [-a] [-n]:" . PHP_EOL;
17+
echo " -h : Show this help" . PHP_EOL;
18+
echo " -d # : Only show users inactive for more that # days" . PHP_EOL;
19+
echo " -n : Notify stale accounts via e-mail [EXPERIMENTAL]" . PHP_EOL;
20+
echo " -a : Show all pool users regardless of inactivity" . PHP_EOL;
21+
exit(0);
22+
}
1523

1624
// Fetch all users
1725
$users = $user->getAllAssoc();

0 commit comments

Comments
 (0)