Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques statiques | |
static | addUserToGroup ($userId, $groupId) |
static | getUserGroups ($userId) |
static | removeUserFromGroup ($userId, $groupId) |
static | setUserGroups ($userId, $groups) |
static | getProfile ($userId=0) |
static | activateUser ($activation) |
static | getUserId ($username) |
static | hashPassword ($password, $algorithm=self::HASH_BCRYPT, array $options=array()) |
static | genRandomPassword ($length=8) |
static | getShortHashedUserAgent () |
static | checkSuperUserInUsers (array $userIds) |
Champs de données | |
const | HASH_ARGON2I = 'argon2i' |
const | HASH_ARGON2I_BC = 2 |
const | HASH_ARGON2ID = 'argon2id' |
const | HASH_ARGON2ID_BC = 3 |
const | HASH_BCRYPT = '2y' |
const | HASH_BCRYPT_BC = 1 |
const | HASH_MD5 = 'md5' |
const | HASH_PHPASS = 'phpass' |
const | HASH_ALGORITHMS |
Authorisation helper class, provides static methods to perform various tasks relevant to the Joomla user and authorisation classes
This class has influences and some method logic from the Horde Auth package
|
static |
Method to activate a user
string | $activation | Activation string |
Références User\$activation, $db, User\$id, $query, $user, Text\_(), Log\add(), User\bind(), Factory\getDbo(), User\getInstance(), et Log\WARNING.
|
static |
Method to add a user to a group.
integer | $userId | The id of the user. |
integer | $groupId | The id of the group. |
Références $db, $query, $temp, $user, $userId, User\bind(), Factory\getDbo(), User\getInstance(), Factory\getSession(), Factory\getUser(), ParameterType\INTEGER, et null.
Référencé par AddUserToGroupCommand\doExecute().
|
static |
Check if there is a super user in the user ids.
array | $userIds | An array of user IDs on which to operate |
Références $userId, et Access\checkGroup().
Référencé par UserModel\batchReset(), et UserModel\batchUser().
|
static |
Generate a random password
integer | $length | Length of the password to generate |
Références $base, $i, et Crypt\genRandomBytes().
Référencé par RegistrationModel\activate(), User\bind(), DatabaseHelper\checkRemoteDbHost(), ConfigurationModel\createConfiguration(), UpdateModel\createUpdateFile(), MD5Handler\hashPassword(), ResetModel\processResetRequest(), RegistrationModel\register(), et ApplicationModel\save().
|
static |
Gets the user profile information
integer | $userId | The id of the user. |
Références $data, $user, $userId, Factory\getApplication(), Factory\getUser(), et PluginHelper\importPlugin().
|
static |
Method to get a hashed user agent string that does not include browser version. Used when frequent version changes cause problems.
Références Uri\base(), et Factory\getApplication().
|
static |
Method to get a list of groups a user is in.
integer | $userId | The id of the user. |
Références $user, $userId, et User\getInstance().
Référencé par DeleteUserCommand\doExecute(), et UserModel\getAssignedGroups().
|
static |
Returns userid if a user exists
string | $username | The username to search on. |
Références $db, $query, User\$username, User\bind(), et Factory\getDbo().
Référencé par ChangeUserPasswordCommand\doExecute(), DeleteUserCommand\doExecute(), et RemoveUserFromGroupCommand\doExecute().
|
static |
Hashes a password using the current encryption.
string | $password | The plaintext password to encrypt. |
string | integer | $algorithm | The hashing algorithm to use, represented by HASH_* class constants, or a container service ID. |
array | $options | The options for the algorithm to use. |
Références $container, $options, User\$password, et Factory\getContainer().
Référencé par User\bind(), ConfigurationModel\createRootUser(), ChangeUserPasswordCommand\doExecute(), Basic\onUserAuthenticate(), et ResetModel\processResetRequest().
|
static |
Method to remove a user from a group.
integer | $userId | The id of the user. |
integer | $groupId | The id of the group. |
Références $key, $temp, $user, $userId, User\getInstance(), et Factory\getUser().
Référencé par RemoveUserFromGroupCommand\doExecute().
|
static |
Method to set the groups for a user.
integer | $userId | The id of the user. |
array | $groups | An array of group ids to put the user in. |
Références $db, User\$groups, $i, $n, $query, $results, $temp, $user, $userId, Factory\getDbo(), User\getInstance(), Factory\getSession(), Factory\getUser(), et ArrayHelper\toInteger().
const HASH_ALGORITHMS |
const HASH_ARGON2I = 'argon2i' |
const HASH_ARGON2I_BC = 2 |
const HASH_ARGON2ID = 'argon2id' |
const HASH_ARGON2ID_BC = 3 |
const HASH_BCRYPT = '2y' |
const HASH_BCRYPT_BC = 1 |
const HASH_MD5 = 'md5' |
const HASH_PHPASS = 'phpass' |