Debian Codegraph @

includes/specials/SpecialRemoveCredentials.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Specials;
4
5 use MediaWiki\Auth\AuthManager;
6 use MediaWiki\MainConfigNames;
7
8 /**
9 * Special change to remove credentials (such as a two-factor token).
10 *
11 * @ingroup SpecialPage
12 */
13 class SpecialRemoveCredentials extends SpecialChangeCredentials {
14 /** @inheritDoc */
15 protected static $allowedActions = [ AuthManager::ACTION_REMOVE ];
16
17 /** @inheritDoc */
18 protected static $messagePrefix = 'removecredentials';
19
20 /** @inheritDoc */
21 protected static $loadUserData = false;
22
23 /**
24 * @param AuthManager $authManager
25 */
26 public function __construct( AuthManager $authManager ) {
27 parent::__construct( $authManager );
28 $this->mName = 'RemoveCredentials';
29 }
30
31 protected function getDefaultAction( $subPage ) {
32 return AuthManager::ACTION_REMOVE;
33 }
34
35 protected function getRequestBlacklist() {
36 return $this->getConfig()->get( MainConfigNames::RemoveCredentialsBlacklist );
37 }
38 }
39
40 /**
41 * Retain the old class name for backwards compatibility.
42 * @deprecated since 1.41
43 */
44 class_alias( SpecialRemoveCredentials::class, 'SpecialRemoveCredentials' );