From: Kunal Mehta Date: Tue, 28 Aug 2018 22:00:08 +0000 (-0700) Subject: Split AuthManagerAuthPluginUser into a separate file X-Git-Tag: 1.34.0-rc.0~4224^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22messagerie%22%29%20.%20%22?a=commitdiff_plain;h=d9deecf432ab2b172a1aaa0d82dc9cb62c7e92ee;p=lhc%2Fweb%2Fwiklou.git Split AuthManagerAuthPluginUser into a separate file Change-Id: I22d2bf9514caf717a5d949bed425de1376670d3e --- diff --git a/.phpcs.xml b/.phpcs.xml index 65ddb73393..9f9459ba04 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -226,7 +226,6 @@ */includes/api/ApiOpenSearch\.php */includes/api/ApiRsd\.php */includes/api/ApiUsageException\.php - */includes/auth/AuthManagerAuthPlugin\.php */includes/AuthPlugin\.php */includes/cache/CacheDependency\.php */includes/cache/CacheHelper\.php diff --git a/autoload.php b/autoload.php index 10aab64e8a..5d03874fcc 100644 --- a/autoload.php +++ b/autoload.php @@ -870,7 +870,7 @@ $wgAutoloadLocalClasses = [ 'MediaWiki\\Auth\\AbstractSecondaryAuthenticationProvider' => __DIR__ . '/includes/auth/AbstractSecondaryAuthenticationProvider.php', 'MediaWiki\\Auth\\AuthManager' => __DIR__ . '/includes/auth/AuthManager.php', 'MediaWiki\\Auth\\AuthManagerAuthPlugin' => __DIR__ . '/includes/auth/AuthManagerAuthPlugin.php', - 'MediaWiki\\Auth\\AuthManagerAuthPluginUser' => __DIR__ . '/includes/auth/AuthManagerAuthPlugin.php', + 'MediaWiki\\Auth\\AuthManagerAuthPluginUser' => __DIR__ . '/includes/auth/AuthManagerAuthPluginUser.php', 'MediaWiki\\Auth\\AuthPluginPrimaryAuthenticationProvider' => __DIR__ . '/includes/auth/AuthPluginPrimaryAuthenticationProvider.php', 'MediaWiki\\Auth\\AuthenticationProvider' => __DIR__ . '/includes/auth/AuthenticationProvider.php', 'MediaWiki\\Auth\\AuthenticationRequest' => __DIR__ . '/includes/auth/AuthenticationRequest.php', diff --git a/includes/auth/AuthManagerAuthPlugin.php b/includes/auth/AuthManagerAuthPlugin.php index 4f84b4c67d..01d992fe74 100644 --- a/includes/auth/AuthManagerAuthPlugin.php +++ b/includes/auth/AuthManagerAuthPlugin.php @@ -199,33 +199,3 @@ class AuthManagerAuthPlugin extends \AuthPlugin { return []; } } - -/** - * @since 1.27 - * @deprecated since 1.27 - */ -class AuthManagerAuthPluginUser extends \AuthPluginUser { - /** @var User */ - private $user; - - function __construct( $user ) { - $this->user = $user; - } - - public function getId() { - return $this->user->getId(); - } - - public function isLocked() { - return $this->user->isLocked(); - } - - public function isHidden() { - return $this->user->isHidden(); - } - - public function resetAuthToken() { - \MediaWiki\Session\SessionManager::singleton()->invalidateSessionsForUser( $this->user ); - return true; - } -} diff --git a/includes/auth/AuthManagerAuthPluginUser.php b/includes/auth/AuthManagerAuthPluginUser.php new file mode 100644 index 0000000000..e31be6019d --- /dev/null +++ b/includes/auth/AuthManagerAuthPluginUser.php @@ -0,0 +1,53 @@ +user = $user; + } + + public function getId() { + return $this->user->getId(); + } + + public function isLocked() { + return $this->user->isLocked(); + } + + public function isHidden() { + return $this->user->isHidden(); + } + + public function resetAuthToken() { + \MediaWiki\Session\SessionManager::singleton()->invalidateSessionsForUser( $this->user ); + return true; + } +}