-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEditAccount.php
More file actions
56 lines (51 loc) · 2.14 KB
/
EditAccount.php
File metadata and controls
56 lines (51 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* EditAccount
*
* This extension is used by privileged users to manage essential user account
* information in the case of a lost password and/or invalid e-mail submitted
* during registration.
*
* Jack Phoenix's notes: the @date comment below also indicates from which
* revision on Wikia SVN this extension was forked from.
* For ShoutWiki, I changed the code so that users can access the special page
* to *permanently shut down* their _own_ account.
* Privileged users, i.e. those with the 'editaccount' permission (staff), can
* use all the features provided by the special page.
*
* Some i18n changes were also done and the logging system was converted to use
* the 1.19-style logging system.
*
* @file
* @ingroup Extensions
* @author Łukasz Garczewski (TOR) <tor@wikia-inc.com>
* @date 22 March 2013 (https://github.com/Wikia/app/commit/bb114fdb72c3be76594ff8bc46384093733c62e4, save for the i18n changes)
* @copyright Copyright © 2008 Łukasz Garczewski, Wikia Inc.
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
*/
if ( !defined( 'MEDIAWIKI' ) ) {
echo "This is a MediaWiki extension named EditAccount.\n";
exit( 1 );
}
// Extension credits that will show up on Special:Version
$wgExtensionCredits['specialpage'][] = array(
'path' => __FILE__,
'name' => 'EditAccount',
'version' => '1.3.1',
'author' => array( 'Łukasz Garczewski', 'Jack Phoenix' ),
'descriptionmsg' => 'editaccount-desc',
'url' => 'https://www.mediawiki.org/wiki/Extension:EditAccount'
);
// New user right, required to use the extension.
$wgAvailableRights[] = 'editaccount';
$wgGroupPermissions['*']['editaccount'] = false;
$wgGroupPermissions['staff']['editaccount'] = true;
// Log definition
$wgLogTypes[] = 'editaccnt';
$wgLogActionsHandlers['editaccnt/*'] = 'LogFormatter';
$wgLogRestrictions['editaccnt'] = 'editaccount';
// Set up the new special page
$wgMessagesDirs['EditAccount'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['EditAccountAliases'] = __DIR__ . '/EditAccount.alias.php';
$wgAutoloadClasses['EditAccount'] = __DIR__ . '/SpecialEditAccount_body.php';
$wgSpecialPages['EditAccount'] = 'EditAccount';