|
MediaWiki master
|
Public Member Functions | |
| __construct (ServiceOptions $options, private readonly ObjectFactory $objectFactory) | |
| getFirstRegistration (UserIdentity $user) | |
| Find the first registration timestamp for a given user. | |
| getFirstRegistrationBatch (iterable $users) | |
| Get the first registration timestamp for a batch of users. | |
| getRegistration (UserIdentity $user, string $type=LocalUserRegistrationProvider::TYPE) | |
| isRegistered (string $type) | |
| Is a registration provider registered? | |
| setCachedRegistration (UserIdentity $user, string|null|false $timestamp, string $type=LocalUserRegistrationProvider::TYPE) | |
| Sets the cached registration timestamp for a given user. | |
Definition at line 16 of file UserRegistrationLookup.php.
| MediaWiki\User\Registration\UserRegistrationLookup::__construct | ( | ServiceOptions | $options, |
| private readonly ObjectFactory | $objectFactory ) |
Definition at line 36 of file UserRegistrationLookup.php.
References MediaWiki\Config\ServiceOptions\assertRequiredOptions(), MediaWiki\Config\ServiceOptions\get(), and MediaWiki\MainConfigNames\UserRegistrationProviders.
| MediaWiki\User\Registration\UserRegistrationLookup::getFirstRegistration | ( | UserIdentity | $user | ) |
Find the first registration timestamp for a given user.
Note this invokes all registered providers.
| UserIdentity | $user |
Definition at line 127 of file UserRegistrationLookup.php.
| MediaWiki\User\Registration\UserRegistrationLookup::getFirstRegistrationBatch | ( | iterable | $users | ) |
Get the first registration timestamp for a batch of users.
This invokes all registered providers and doesn't use caching.
| iterable<UserIdentity> | $users |
null for users without a stored registration timestamp and for anonymous users. Definition at line 154 of file UserRegistrationLookup.php.
| MediaWiki\User\Registration\UserRegistrationLookup::getRegistration | ( | UserIdentity | $user, |
| string | $type = LocalUserRegistrationProvider::TYPE ) |
| UserIdentity | $user | User for which registration should be fetched. |
| string | $type | Name of a registered registration provider |
Definition at line 80 of file UserRegistrationLookup.php.
References MediaWiki\User\UserIdentity\isRegistered().
| MediaWiki\User\Registration\UserRegistrationLookup::isRegistered | ( | string | $type | ) |
Is a registration provider registered?
| string | $type |
Definition at line 51 of file UserRegistrationLookup.php.
| MediaWiki\User\Registration\UserRegistrationLookup::setCachedRegistration | ( | UserIdentity | $user, |
| string|null|false | $timestamp, | ||
| string | $type = LocalUserRegistrationProvider::TYPE ) |
Sets the cached registration timestamp for a given user.
Can only be used to set the date for registered users. If the size of the cache exceeds CACHE_MAX_SIZE, the oldest entry is evicted.
Definition at line 101 of file UserRegistrationLookup.php.