From: Chad Horohoe Date: Thu, 5 May 2011 05:11:50 +0000 (+0000) Subject: (bug 23495) Allow createAndPromote.php to create non-sysop users X-Git-Tag: 1.31.0-rc.0~30398 X-Git-Url: https://git.cyclocoop.org//%22?a=commitdiff_plain;h=2257d20d116b83590cf82836f25828191659c93f;p=lhc%2Fweb%2Fwiklou.git (bug 23495) Allow createAndPromote.php to create non-sysop users --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f5c5680e7a..46dc3ba96a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -126,6 +126,7 @@ production. * (bug 13879) Special:Emailuser asks for suitable target user if called without. * (bug 16956) IPTC and XMP metadata now extracted from images. * (bug 23816) A tracking category is now added for any pages with broken images. +* (bug 23495) Allow createAndPromote.php to create non-sysop users === Bug fixes in 1.18 === * (bug 23119) WikiError class and subclasses are now marked as deprecated. diff --git a/maintenance/createAndPromote.php b/maintenance/createAndPromote.php index 8bff284a11..db25a2fe21 100644 --- a/maintenance/createAndPromote.php +++ b/maintenance/createAndPromote.php @@ -28,7 +28,8 @@ class CreateAndPromote extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Create a new user account with administrator rights"; + $this->mDescription = "Create a new user account"; + $this->addOption( "sysop", "Grant the account sysop rights" ); $this->addOption( "bureaucrat", "Grant the account bureaucrat rights" ); $this->addArg( "username", "Username of new user" ); $this->addArg( "password", "Password to set" ); @@ -59,9 +60,12 @@ class CreateAndPromote extends Maintenance { $user->saveSettings(); # Promote user - $user->addGroup( 'sysop' ); - if ( $this->hasOption( 'bureaucrat' ) ) + if ( $this->hasOption( 'sysop' ) ) { $user->addGroup( 'bureaucrat' ); + } + if ( $this->hasOption( 'bureaucrat' ) ) { + $user->addGroup( 'bureaucrat' ); + } # Increment site_stats.ss_users $ssu = new SiteStatsUpdate( 0, 0, 0, 0, 1 );