diff options
author | Gergő Tisza <tgr.huwiki@gmail.com> | 2023-12-28 19:46:14 -0800 |
---|---|---|
committer | Gergő Tisza <tgr.huwiki@gmail.com> | 2023-12-28 19:47:10 -0800 |
commit | 74d4d4974b95ff2a2161be1dcc0c8ec0e288215d (patch) | |
tree | be7952a9314488fa8429f825d482c87e892d0e83 /includes/user | |
parent | aab9362b0f4f39532a140e2bd255c9f979b705b4 (diff) | |
download | mediawikicore-74d4d4974b95ff2a2161be1dcc0c8ec0e288215d.tar.gz mediawikicore-74d4d4974b95ff2a2161be1dcc0c8ec0e288215d.zip |
documentation: Mention ReservedUsernames in newSystemUser()
Change-Id: I90df61c39f351a3ea7adda3f0a6b06342b04ca17
Diffstat (limited to 'includes/user')
-rw-r--r-- | includes/user/User.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/user/User.php b/includes/user/User.php index a0972a124586..b8ae0b70ef2e 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -41,6 +41,7 @@ use MediaWiki\HookContainer\ProtectedHookAccessorTrait; use MediaWiki\Logger\LoggerFactory; use MediaWiki\Mail\UserEmailContact; use MediaWiki\MainConfigNames; +use MediaWiki\MainConfigSchema; use MediaWiki\MediaWikiServices; use MediaWiki\Page\PageIdentity; use MediaWiki\Parser\Sanitizer; @@ -767,6 +768,8 @@ class User implements Authority, UserIdentity, UserEmailContact { * - AuthManager is instructed to revoke access, to invalidate or remove * passwords and other credentials. * + * System users should usually be listed in $wgReservedUsernames. + * * @param string $name Username * @param array $options Options are: * - validate: Type of validation to use: @@ -780,6 +783,8 @@ class User implements Authority, UserIdentity, UserEmailContact { * exists, default false * @return User|null * @since 1.27 + * @see self::isSystemUser() + * @see MainConfigSchema::ReservedUsernames */ public static function newSystemUser( $name, $options = [] ) { $options += [ |