UserFactory

Implements UserFactoryInterface

Default factory for creating User objects

since

4.0.0

package

Joomla CMS

Methods

__construct

UserFactory constructor.

__construct(\Joomla\Database\DatabaseInterface db) : 

Arguments

db

DatabaseInterfaceThe database

Response

mixed

loadUserById

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

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

4.0.0

Arguments

id

intThe id

Response

User

loadUserByUsername

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

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

4.0.0

Arguments

username

stringThe username

Response

User

Properties

db

The database.

Type(s)

DatabaseInterface