* @ingroup Maintenance
*/
class CreateAndPromote extends Maintenance {
- private static $permitRoles = [ 'sysop', 'bureaucrat', 'bot' ];
+ private static $permitRoles = [ 'sysop', 'bureaucrat', 'interface-admin', 'bot' ];
public function __construct() {
parent::__construct();
$this->fatalError( "invalid username." );
}
- $exists = ( 0 !== $user->idForName() );
+ $exists = ( $user->idForName() !== 0 );
if ( $exists && !$force ) {
$this->fatalError( "Account exists. Perhaps you want the --force option?" );