X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcreateAndPromote.php;h=24ab3d21fc72a1cb8c1e7b3e86365b63e5c5c105;hb=9d7a2a625193e8e1c767629e3d01da72c3e8712d;hp=d3efca6f42a7f16ea9fd2707e850c494567ed58e;hpb=967a96e7fa5910f8fc451590decb381dbfb481ba;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/createAndPromote.php b/maintenance/createAndPromote.php index d3efca6f42..24ab3d21fc 100644 --- a/maintenance/createAndPromote.php +++ b/maintenance/createAndPromote.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php'; * @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(); @@ -66,7 +66,7 @@ class CreateAndPromote extends Maintenance { $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?" );