summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2014-01-15 20:40:20 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2014-01-15 20:40:20 +0100
commitce1daccd15bf88b76794a94ef87755c8242318c6 (patch)
tree9eb65c1bb0a008fb7cadf0beb56d2a06e9513c6a
parentadf19bc54d40300230318a329d5b9fdac3d5564f (diff)
downloadphpbb-sync-ce1daccd15bf88b76794a94ef87755c8242318c6.tar.gz
phpbb-sync-ce1daccd15bf88b76794a94ef87755c8242318c6.tar.bz2
phpbb-sync-ce1daccd15bf88b76794a94ef87755c8242318c6.zip
add --help
-rwxr-xr-xsync.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/sync.php b/sync.php
index c65a1d5..a5e0700 100755
--- a/sync.php
+++ b/sync.php
@@ -14,6 +14,24 @@ init_ldap();
// config
$dry_run = in_array('--dryrun', $argv) || in_array('-n', $argv);
$verbose = in_array('--verbose', $argv) || in_array('-v', $argv);
+$help = in_array('--help', $argv) || in_array('-h', $argv) || in_array('-?', $argv);
+
+if ($help) {
+ $text = <<<EOH
+This script could be used to delete phpBB users, that does not exists
+anymore in a ldap tree used for authentification. The users are marked
+with "*LDAP*" as password.
+
+usage: ${argv[0]} [--dryrun] [--verbose] [--help]
+
+ --dryrun -n Do not actually delete the user but printing it only.
+ --verbose -v Also display the users that exists in the ldap tree.
+ --help -h -? Display this message.
+EOH;
+
+ print("$text\n");
+ exit;
+}
/**
* Check if a given username exist in the ldap tree. Uses the configured ldap settings