|
MediaWiki master
|
A service to look up user identities based on the user input. More...
Public Member Functions | |
| __construct (private readonly ActorStoreFactory $actorStoreFactory, private readonly UserFactory $userFactory, private readonly ServiceOptions $options,) | |
| getUserIdentity (string $designator, ?Authority $viewer=null) | |
| Looks up for a user identity based on the passed designator string. | |
Public Attributes | |
| const | CONSTRUCTOR_OPTIONS |
A service to look up user identities based on the user input.
This class is similar to UserIdentityLookup but allows to search for users using multiple input formats (e.g. user ID, user name, user name with interwiki suffix).
This service is designed to be of higher level than UserIdentityLookup and handy in places like special pages or API modules where the input can be in multiple formats. Additionally, this service allows to check for user rights, e.g. whether a hidden user should be returned or not.
Definition at line 29 of file MultiFormatUserIdentityLookup.php.
| MediaWiki\User\MultiFormatUserIdentityLookup::__construct | ( | private readonly ActorStoreFactory | $actorStoreFactory, |
| private readonly UserFactory | $userFactory, | ||
| private readonly ServiceOptions | $options ) |
Definition at line 37 of file MultiFormatUserIdentityLookup.php.
| MediaWiki\User\MultiFormatUserIdentityLookup::getUserIdentity | ( | string | $designator, |
| ?Authority | $viewer = null ) |
Looks up for a user identity based on the passed designator string.
The designator can be in one of the following formats:
wgUserrightsInterwikiDelimiter config option.For interwiki users, this service assures that the remote wiki exists and is considered a local database (i.e. is listed in wgLocalDatabases).
| string | $designator | |
| Authority | null | $viewer |
Definition at line 60 of file MultiFormatUserIdentityLookup.php.
References MediaWiki\MainConfigNames\LocalDatabases.
| const MediaWiki\User\MultiFormatUserIdentityLookup::CONSTRUCTOR_OPTIONS |
Definition at line 32 of file MultiFormatUserIdentityLookup.php.