MediaWiki REL1_40
|
Inherits IDBAccessObject, and MediaWiki\User\UserRigorOptions.
Public Member Functions | |
__construct (ILoadBalancer $loadBalancer, UserNameUtils $userNameUtils) | |
newAnonymous (?string $ip=null) | |
Returns a new anonymous User based on ip. | |
newFromActorId (int $actorId) | |
Factory method for creation from a given actor ID, replacing User::newFromActorId. | |
newFromAnyId (?int $userId, ?string $userName, ?int $actorId=null, $dbDomain=false) | |
Factory method for creation from an ID, name, and/or actor ID, replacing User::newFromAnyId. | |
newFromAuthority (Authority $authority) | |
newFromConfirmationCode (string $confirmationCode, int $flags=self::READ_NORMAL) | |
Factory method to fetch the user for a given email confirmation code, replacing User::newFromConfirmationCode. | |
newFromId (int $id) | |
Factory method for creation from a given user ID, replacing User::newFromId. | |
newFromName (string $name, string $validate=self::RIGOR_VALID) | |
Factory method for creating users by name, replacing static User::newFromName. | |
newFromRow ( $row, $data=null) | |
newFromUserIdentity (UserIdentity $userIdentity) | |
Factory method for creation fom a given UserIdentity, replacing User::newFromIdentity. | |
newTempPlaceholder () | |
Create a placeholder user for an anonymous user who will be upgraded to a temporary user. | |
newUnsavedTempUser (string $name) | |
Create an unsaved temporary user with a previously acquired name. | |
Additional Inherited Members | |
Public Attributes inherited from IDBAccessObject | |
const | READ_NONE = -1 |
Constants for object loading bitfield flags (higher => higher QoS) | |
MediaWiki\User\UserFactory::__construct | ( | ILoadBalancer | $loadBalancer, |
UserNameUtils | $userNameUtils ) |
ILoadBalancer | $loadBalancer | |
UserNameUtils | $userNameUtils |
Definition at line 58 of file UserFactory.php.
MediaWiki\User\UserFactory::newAnonymous | ( | ?string | $ip = null | ) |
Returns a new anonymous User based on ip.
string | null | $ip | IP address |
Definition at line 109 of file UserFactory.php.
MediaWiki\User\UserFactory::newFromActorId | ( | int | $actorId | ) |
Factory method for creation from a given actor ID, replacing User::newFromActorId.
int | $actorId |
Definition at line 146 of file UserFactory.php.
MediaWiki\User\UserFactory::newFromAnyId | ( | ?int | $userId, |
?string | $userName, | ||
?int | $actorId = null, | ||
$dbDomain = false ) |
Factory method for creation from an ID, name, and/or actor ID, replacing User::newFromAnyId.
?int | $userId | |
?string | $userName | |
?int | $actorId | |
string | false | $dbDomain |
InvalidArgumentException | if none of userId, userName, and actorId are specified |
Definition at line 205 of file UserFactory.php.
MediaWiki\User\UserFactory::newFromAuthority | ( | Authority | $authority | ) |
Authority | $authority |
Definition at line 309 of file UserFactory.php.
MediaWiki\User\UserFactory::newFromConfirmationCode | ( | string | $confirmationCode, |
int | $flags = self::READ_NORMAL ) |
Factory method to fetch the user for a given email confirmation code, replacing User::newFromConfirmationCode.
This code is generated when an account is created or its e-mail address has changed. If the code is invalid or has expired, returns null.
string | $confirmationCode | |
int | $flags |
Definition at line 265 of file UserFactory.php.
MediaWiki\User\UserFactory::newFromId | ( | int | $id | ) |
Factory method for creation from a given user ID, replacing User::newFromId.
int | $id | Valid user ID |
Definition at line 130 of file UserFactory.php.
MediaWiki\User\UserFactory::newFromName | ( | string | $name, |
string | $validate = self::RIGOR_VALID ) |
Factory method for creating users by name, replacing static User::newFromName.
This is slightly less efficient than newFromId(), so use newFromId() if you have both an ID and a name handy.
string | $name | Username, validated by Title::newFromText |
string | $validate | Validation strategy, one of the RIGOR_* constants. For no validation, use RIGOR_NONE. |
Definition at line 84 of file UserFactory.php.
MediaWiki\User\UserFactory::newFromRow | ( | $row, | |
$data = null ) |
stdClass | $row | A row from the user table |
array | null | $data | Further data to load into the object |
Definition at line 300 of file UserFactory.php.
References User\newFromRow().
MediaWiki\User\UserFactory::newFromUserIdentity | ( | UserIdentity | $userIdentity | ) |
Factory method for creation fom a given UserIdentity, replacing User::newFromIdentity.
UserIdentity | $userIdentity |
Definition at line 162 of file UserFactory.php.
MediaWiki\User\UserFactory::newTempPlaceholder | ( | ) |
Create a placeholder user for an anonymous user who will be upgraded to a temporary user.
This will throw an exception if temp user autocreation is disabled.
Definition at line 324 of file UserFactory.php.
MediaWiki\User\UserFactory::newUnsavedTempUser | ( | string | $name | ) |
Create an unsaved temporary user with a previously acquired name.
string | $name |
Definition at line 337 of file UserFactory.php.