diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2014-01-15 20:40:20 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2014-01-15 20:40:20 +0100 |
commit | ce1daccd15bf88b76794a94ef87755c8242318c6 (patch) | |
tree | 9eb65c1bb0a008fb7cadf0beb56d2a06e9513c6a | |
parent | adf19bc54d40300230318a329d5b9fdac3d5564f (diff) | |
download | phpbb-sync-ce1daccd15bf88b76794a94ef87755c8242318c6.tar.gz phpbb-sync-ce1daccd15bf88b76794a94ef87755c8242318c6.tar.bz2 phpbb-sync-ce1daccd15bf88b76794a94ef87755c8242318c6.zip |
add --help
-rwxr-xr-x | sync.php | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -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 |