36 protected $origin = self::ORIGIN_USER_INDIVIDUAL;
44 if ( !$user || !$user->isRegistered() ) {
54 $userPage = $titleFormatter->getPrefixedDBkey(
new TitleValue(
NS_USER, $user->getName() ) );
55 $pages[
"$userPage/common.js"] = [
'type' =>
'script' ];
56 $pages[
"$userPage/" . $context->
getSkin() .
'.js'] = [
'type' =>
'script' ];
62 foreach ( $userGroupManager->getUserEffectiveGroups( $user ) as
$group ) {
66 $pages[
"MediaWiki:Group-$group.js"] = [
'type' =>
'script' ];
79 return self::GROUP_USER;
84class_alias( UserModule::class,
'ResourceLoaderUserModule' );
A class containing constants representing the names of configuration variables.
const UseSiteJs
Name constant for the UseSiteJs setting, for use with Config::get()
const AllowUserJs
Name constant for the AllowUserJs setting, for use with Config::get()
Context object that contains information about the state of a specific ResourceLoader web request.
getUserIdentity()
Get the possibly-cached UserIdentity object for the specified username.
Represents a page (or page fragment) title within MediaWiki.
get( $name)
Get a configuration variable such as "Sitename" or "UploadMaintenance.".