MediaWiki REL1_41
MediaWiki\User\Registration\UserRegistrationLookup Class Reference

Public Member Functions

 __construct (ServiceOptions $options, ObjectFactory $objectFactory)
 
 getFirstRegistration (UserIdentity $user)
 Find the first registration timestamp for a given user.
 
 getRegistration (UserIdentity $user, string $type=LocalUserRegistrationProvider::TYPE)
 
 isRegistered (string $type)
 Is a registration provider registered?
 

Detailed Description

Since
1.41

Definition at line 15 of file UserRegistrationLookup.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\User\Registration\UserRegistrationLookup::__construct ( ServiceOptions $options,
ObjectFactory $objectFactory )

Member Function Documentation

◆ getFirstRegistration()

MediaWiki\User\Registration\UserRegistrationLookup::getFirstRegistration ( UserIdentity $user)

Find the first registration timestamp for a given user.

Note this invokes all registered providers.

Parameters
UserIdentity$user
Returns
string|null Earliest registration timestamp, null if not available.

Definition at line 93 of file UserRegistrationLookup.php.

References wfTimestamp().

◆ getRegistration()

MediaWiki\User\Registration\UserRegistrationLookup::getRegistration ( UserIdentity $user,
string $type = LocalUserRegistrationProvider::TYPE )
Parameters
UserIdentity$userUser for which registration should be fetched.
string$typeName of a registered registration provider
Returns
string|null|false Registration timestamp, null if not available or false if it cannot be fetched (anonymous users, for example).

Definition at line 78 of file UserRegistrationLookup.php.

◆ isRegistered()

MediaWiki\User\Registration\UserRegistrationLookup::isRegistered ( string $type)

Is a registration provider registered?

See also
MainConfigSchema::UserRegistrationLookupProviders
Parameters
string$type
Returns
bool

Definition at line 49 of file UserRegistrationLookup.php.


The documentation for this class was generated from the following file: