MediaWiki
master
LocalUserRegistrationProvider.php
Go to the documentation of this file.
1
<?php
2
3
namespace
MediaWiki\User\Registration
;
4
5
use
MediaWiki\User\UserFactory
;
6
use
MediaWiki\User\UserIdentity
;
7
8
class
LocalUserRegistrationProvider
implements
IUserRegistrationProvider
{
9
10
public
const
TYPE
=
'local'
;
11
12
private
UserFactory
$userFactory;
13
17
public
function
__construct
(
UserFactory
$userFactory ) {
18
$this->userFactory = $userFactory;
19
}
20
24
public
function
fetchRegistration
(
UserIdentity
$user ) {
25
// TODO: Factor this out from User::getRegistration to this method (T352871)
26
$user = $this->userFactory->newFromUserIdentity( $user );
27
return
$user->getRegistration();
28
}
29
}
MediaWiki\User\Registration\LocalUserRegistrationProvider
Definition
LocalUserRegistrationProvider.php:8
MediaWiki\User\Registration\LocalUserRegistrationProvider\TYPE
const TYPE
Definition
LocalUserRegistrationProvider.php:10
MediaWiki\User\Registration\LocalUserRegistrationProvider\fetchRegistration
fetchRegistration(UserIdentity $user)
Get user registration timestamp.string|false|null Registration timestamp, null if not available or fa...
Definition
LocalUserRegistrationProvider.php:24
MediaWiki\User\Registration\LocalUserRegistrationProvider\__construct
__construct(UserFactory $userFactory)
Definition
LocalUserRegistrationProvider.php:17
MediaWiki\User\UserFactory
Creates User objects.
Definition
UserFactory.php:42
MediaWiki\User\Registration\IUserRegistrationProvider
Definition
IUserRegistrationProvider.php:11
MediaWiki\User\UserIdentity
Interface for objects representing user identity.
Definition
UserIdentity.php:39
MediaWiki\User\Registration
Definition
IUserRegistrationProvider.php:3
includes
user
Registration
LocalUserRegistrationProvider.php
Generated on Sun Nov 3 2024 10:26:32 for MediaWiki by
1.10.0