Back to Joomla project (class list)

Class UserFactory - list of methods

Default factory for creating User objects

Extends

Package: Joomla\CMS\User
Copyright: (C) 2019 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/User/UserFactory.php
Project: Joomla

Method Summary

public
(\Joomla\Database\DatabaseInterface $db)

UserFactory constructor.
Parameters
  • \Joomla\Database\DatabaseInterface $db The database
Show source code of this method: __construct Source Code

public \Joomla\CMS\User\User
(int $id)

Method to get an instance of a user for the given id.
Parameters
  • int $id The id
Returns
  • \Joomla\CMS\User\User
Since
  • 4.0.0
Show source code of this method: loadUserById Source Code

public \Joomla\CMS\User\User
(string $username)

Method to get an instance of a user for the given username.
Parameters
  • string $username The username
Returns
  • \Joomla\CMS\User\User
Since
  • 4.0.0
Show source code of this method: loadUserByUsername Source Code

Properties Summary

private \Joomla\Database\DatabaseInterface
$db
The database.

Tags Summary

Since
4.0.0