} elseif ( $this->hasOption( "userid" ) ) {
$user = User::newFromId( $this->getOption( 'userid' ) );
} else {
- $this->error( "A \"user\" or \"userid\" must be set to change the password for", true );
+ $this->fatalError( "A \"user\" or \"userid\" must be set to change the password for" );
}
if ( !$user || !$user->getId() ) {
- $this->error( "No such user: " . $this->getOption( 'user' ), true );
+ $this->fatalError( "No such user: " . $this->getOption( 'user' ) );
}
$password = $this->getOption( 'password' );
try {
$user->saveSettings();
$this->output( "Password set for " . $user->getName() . "\n" );
} catch ( PasswordError $pwe ) {
- $this->error( $pwe->getText(), true );
+ $this->fatalError( $pwe->getText() );
}
}
}