Index: trunk/phase3/maintenance/createAndPromote.php |
— | — | @@ -28,7 +28,8 @@ |
29 | 29 | |
30 | 30 | public function __construct() { |
31 | 31 | parent::__construct(); |
32 | | - $this->mDescription = "Create a new user account with administrator rights"; |
| 32 | + $this->mDescription = "Create a new user account"; |
| 33 | + $this->addOption( "sysop", "Grant the account sysop rights" ); |
33 | 34 | $this->addOption( "bureaucrat", "Grant the account bureaucrat rights" ); |
34 | 35 | $this->addArg( "username", "Username of new user" ); |
35 | 36 | $this->addArg( "password", "Password to set" ); |
— | — | @@ -59,9 +60,12 @@ |
60 | 61 | $user->saveSettings(); |
61 | 62 | |
62 | 63 | # Promote user |
63 | | - $user->addGroup( 'sysop' ); |
64 | | - if ( $this->hasOption( 'bureaucrat' ) ) |
| 64 | + if ( $this->hasOption( 'sysop' ) ) { |
65 | 65 | $user->addGroup( 'bureaucrat' ); |
| 66 | + } |
| 67 | + if ( $this->hasOption( 'bureaucrat' ) ) { |
| 68 | + $user->addGroup( 'bureaucrat' ); |
| 69 | + } |
66 | 70 | |
67 | 71 | # Increment site_stats.ss_users |
68 | 72 | $ssu = new SiteStatsUpdate( 0, 0, 0, 0, 1 ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -126,6 +126,7 @@ |
127 | 127 | * (bug 13879) Special:Emailuser asks for suitable target user if called without. |
128 | 128 | * (bug 16956) IPTC and XMP metadata now extracted from images. |
129 | 129 | * (bug 23816) A tracking category is now added for any pages with broken images. |
| 130 | +* (bug 23495) Allow createAndPromote.php to create non-sysop users |
130 | 131 | |
131 | 132 | === Bug fixes in 1.18 === |
132 | 133 | * (bug 23119) WikiError class and subclasses are now marked as deprecated. |