Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1149,7 +1149,6 @@ |
1150 | 1150 | 'right-override-export-depth', |
1151 | 1151 | 'right-sendemail', |
1152 | 1152 | 'right-revisionmove', |
1153 | | - 'right-disableaccount', |
1154 | 1153 | ), |
1155 | 1154 | 'rightslog' => array( |
1156 | 1155 | 'rightslog', |
— | — | @@ -3301,17 +3300,6 @@ |
3302 | 3301 | 'sqlite-has-fts', |
3303 | 3302 | 'sqlite-no-fts', |
3304 | 3303 | ), |
3305 | | - 'disableaccount' => array( |
3306 | | - 'disableaccount', |
3307 | | - 'disableaccount-user', |
3308 | | - 'disableaccount-reason', |
3309 | | - 'disableaccount-confirm', |
3310 | | - 'disableaccount-mustconfirm', |
3311 | | - 'disableaccount-confirm', |
3312 | | - 'disableaccount-nosuchuser', |
3313 | | - 'disableaccount-success', |
3314 | | - 'disableaccount-logentry', |
3315 | | - ), |
3316 | 3304 | ); |
3317 | 3305 | |
3318 | 3306 | /** Comments for each block */ |
— | — | @@ -3526,5 +3514,4 @@ |
3527 | 3515 | 'db-error-messages' => 'Database error messages', |
3528 | 3516 | 'html-forms' => 'HTML forms', |
3529 | 3517 | 'sqlite' => 'SQLite database support', |
3530 | | - 'disableaccount' => 'Special:DisableAccount', |
3531 | 3518 | ); |
Index: trunk/phase3/includes/AutoLoader.php |
— | — | @@ -683,7 +683,6 @@ |
684 | 684 | 'SpecialBookSources' => 'includes/specials/SpecialBooksources.php', |
685 | 685 | 'SpecialCategories' => 'includes/specials/SpecialCategories.php', |
686 | 686 | 'SpecialComparePages' => 'includes/specials/SpecialComparePages.php', |
687 | | - 'SpecialDisableAccount' => 'includes/specials/SpecialDisableAccount.php', |
688 | 687 | 'SpecialEditWatchlist' => 'includes/specials/SpecialEditWatchlist.php', |
689 | 688 | 'SpecialExport' => 'includes/specials/SpecialExport.php', |
690 | 689 | 'SpecialFilepath' => 'includes/specials/SpecialFilepath.php', |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -3370,11 +3370,6 @@ |
3371 | 3371 | // For private suppression log access |
3372 | 3372 | #$wgGroupPermissions['suppress']['suppressionlog'] = true; |
3373 | 3373 | |
3374 | | -// Permission to disable user accounts |
3375 | | -// Note that disabling an account is not reversible without a system administrator |
3376 | | -// who has direct access to the database |
3377 | | -#$wgGroupPermissions['bureaucrat']['disableaccount'] = true; |
3378 | | - |
3379 | 3374 | /** |
3380 | 3375 | * The developer group is deprecated, but can be activated if need be |
3381 | 3376 | * to use the 'lockdb' and 'unlockdb' special pages. Those require |
Index: trunk/phase3/includes/specials/SpecialDisableAccount.php |
— | — | @@ -1,73 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -class SpecialDisableAccount extends SpecialPage { |
5 | | - function __construct() { |
6 | | - parent::__construct( 'DisableAccount', 'disableaccount', |
7 | | - true, array( $this, 'show' ) ); |
8 | | - } |
9 | | - |
10 | | - public function show( $par ) { |
11 | | - $formFields = array( |
12 | | - 'account' => array( |
13 | | - 'type' => 'text', |
14 | | - 'validation-callback' => array( __CLASS__, 'validateUser' ), |
15 | | - 'label-message' => 'disableaccount-user', |
16 | | - ), |
17 | | - 'comment' => array( |
18 | | - 'type' => 'text', |
19 | | - 'label-message' => 'disableaccount-reason', |
20 | | - ), |
21 | | - 'confirm' => array( |
22 | | - 'type' => 'toggle', |
23 | | - 'validation-callback' => array( __CLASS__, 'checkConfirmation' ), |
24 | | - 'label-message' => 'disableaccount-confirm', |
25 | | - ), |
26 | | - ); |
27 | | - |
28 | | - $htmlForm = new HTMLForm( $formFields, 'disableaccount' ); |
29 | | - |
30 | | - $htmlForm->setSubmitCallback( array( __CLASS__, 'submit' ) ); |
31 | | - $htmlForm->setTitle( $this->getTitle() ); |
32 | | - |
33 | | - $htmlForm->show(); |
34 | | - } |
35 | | - |
36 | | - static function validateUser( $field, $allFields ) { |
37 | | - $u = User::newFromName( $field ); |
38 | | - |
39 | | - if ( $u && $u->getID() != 0 ) { |
40 | | - return true; |
41 | | - } else { |
42 | | - return wfMsgExt( 'disableaccount-nosuchuser', 'parseinline', array( $field ) ); |
43 | | - } |
44 | | - } |
45 | | - |
46 | | - static function checkConfirmation( $field, $allFields ) { |
47 | | - if ( $field ) { |
48 | | - return true; |
49 | | - } else { |
50 | | - return wfMsgExt( 'disableaccount-mustconfirm', 'parseinline' ); |
51 | | - } |
52 | | - } |
53 | | - |
54 | | - static function submit( $fields ) { |
55 | | - $user = User::newFromName( $fields['account'] ); |
56 | | - |
57 | | - $user->setPassword( null ); |
58 | | - $user->setEmail( null ); |
59 | | - $user->setToken(); |
60 | | - $user->addGroup( 'inactive' ); |
61 | | - |
62 | | - $user->saveSettings(); |
63 | | - $user->invalidateCache(); |
64 | | - |
65 | | - $logPage = new LogPage( 'rights' ); |
66 | | - |
67 | | - $logPage->addEntry( 'disable', $user->getUserPage(), $fields['comment'] ); |
68 | | - |
69 | | - global $wgOut; |
70 | | - $wgOut->addWikiMsg( 'disableaccount-success', $user->getName() ); |
71 | | - |
72 | | - return true; |
73 | | - } |
74 | | -} |
\ No newline at end of file |
Index: trunk/phase3/includes/SpecialPage.php |
— | — | @@ -133,7 +133,6 @@ |
134 | 134 | 'Listbots' => 'SpecialListBots', |
135 | 135 | 'Activeusers' => 'SpecialActiveUsers', |
136 | 136 | 'Userrights' => 'UserrightsPage', |
137 | | - 'DisableAccount' => 'SpecialDisableAccount', |
138 | 137 | 'EditWatchlist' => 'SpecialEditWatchlist', |
139 | 138 | |
140 | 139 | # Recent changes and logs |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -382,7 +382,6 @@ |
383 | 383 | 'CreateAccount' => array( 'CreateAccount' ), |
384 | 384 | 'Deadendpages' => array( 'DeadendPages' ), |
385 | 385 | 'DeletedContributions' => array( 'DeletedContributions' ), |
386 | | - 'DisableAccount' => array( 'DisableAccount' ), |
387 | 386 | 'Disambiguations' => array( 'Disambiguations' ), |
388 | 387 | 'DoubleRedirects' => array( 'DoubleRedirects' ), |
389 | 388 | 'EditWatchlist' => array( 'EditWatchlist' ), |
— | — | @@ -1970,7 +1969,6 @@ |
1971 | 1970 | 'right-override-export-depth' => 'Export pages including linked pages up to a depth of 5', |
1972 | 1971 | 'right-sendemail' => 'Send e-mail to other users', |
1973 | 1972 | 'right-revisionmove' => 'Move revisions', |
1974 | | -'right-disableaccount' => 'Disable accounts', |
1975 | 1973 | |
1976 | 1974 | # User rights log |
1977 | 1975 | 'rightslog' => 'User rights log', |
— | — | @@ -4425,18 +4423,4 @@ |
4426 | 4424 | # SQLite database support |
4427 | 4425 | 'sqlite-has-fts' => '$1 with full-text search support', |
4428 | 4426 | 'sqlite-no-fts' => '$1 without full-text search support', |
4429 | | - |
4430 | | -# Special:DisableAccount |
4431 | | -'disableaccount' => 'Disable a user account', |
4432 | | -'disableaccount-user' => 'Username:', |
4433 | | -'disableaccount-reason' => 'Reason:', |
4434 | | -'disableaccount-confirm' => "Disable this user account. |
4435 | | -The user will not be able to log in, reset their password, or receive e-mail notifications. |
4436 | | -If the user is currently logged in anywhere, they will be immediately logged out. |
4437 | | -''Note that disabling an account is not reversible without system administrator intervention.''", |
4438 | | -'disableaccount-mustconfirm' => 'You must confirm that you wish to disable this account.', |
4439 | | -'disableaccount-nosuchuser' => 'The user account "$1" does not exist.', |
4440 | | -'disableaccount-success' => 'The user account "$1" has been permanently disabled.', |
4441 | | -'disableaccount-logentry' => 'permanently disabled the user account [[$1]]', |
4442 | | - |
4443 | 4427 | ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -67,8 +67,6 @@ |
68 | 68 | require_once "$IP/extensions/Math/Math.php"; |
69 | 69 | |
70 | 70 | === New features in 1.18 === |
71 | | -* Added a special page, disabled by default, that allows users with the |
72 | | - 'disableaccount' privilege to permanently deactivate user accounts. |
73 | 71 | * (bug 8130) Query pages should limit to content namespaces, not just main |
74 | 72 | namespace |
75 | 73 | * Search suggestions (other than in the Vector skin) will now use the HTML5 |