UserFactory

Implements \Joomla\CMS\User\UserFactoryInterface

Default factory for creating User objects

since

4.0.0

Methods

__construct

UserFactory constructor.

__construct(\Joomla\Database\DatabaseInterface $db) 

Arguments

$db

\Joomla\Database\DatabaseInterfaceThe database

loadUserById

Method to get an instance of a user for the given id.

loadUserById(integer $id) : \Joomla\CMS\User\User
since

4.0.0

Arguments

$id

integerThe id

Response

\Joomla\CMS\User\User

loadUserByUsername

Method to get an instance of a user for the given username.

loadUserByUsername(string $username) : \Joomla\CMS\User\User
since

4.0.0

Arguments

$username

stringThe username

Response

\Joomla\CMS\User\User

Properties

db

The database.

Type(s)

\Joomla\Database\DatabaseInterface