28require_once __DIR__ .
'/Maintenance.php';
38 parent::__construct();
39 $this->
addOption(
"user",
"The username to operate on",
false,
true );
40 $this->
addOption(
"userid",
"The user id to operate on",
false,
true );
45 $user = $this->
validateUserOption(
"A \"user\" or \"userid\" must be set to invalidate the bot passwords for" );
47 $res = BotPassword::invalidateAllPasswordsForUser( $user->getName() );
50 $this->
output(
"Bot passwords invalidated for " . $user->getName() .
"\n" );
52 $this->
output(
"No bot passwords invalidated for " . $user->getName() .
"\n" );
59require_once RUN_MAINTENANCE_IF_MAIN;
Maintenance script to invalidate the bot passwords of a given user.
execute()
Do the actual work.
__construct()
Default constructor.
Abstract maintenance class for quickly writing and churning out maintenance scripts with minimal effo...
validateUserOption( $errorMsg)
output( $out, $channel=null)
Throw some output to the user.
addOption( $name, $description, $required=false, $withArg=false, $shortName=false, $multiOccurrence=false)
Add a parameter to the script.
addDescription( $text)
Set the description text.