Liste de tous les membres
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) |
static | verifyPassword ($password, $hash, $user_id=0) |
static | getCryptedPassword ($plaintext, $salt= '', $encryption= 'md5-hex', $show_encrypt=false) |
static | getSalt ($encryption= 'md5-hex', $seed= '', $plaintext= '') |
static | genRandomPassword ($length=8) |
Fonctions membres protégées statiques |
static | _toAPRMD5 ($value, $count) |
Fonctions membres privées statiques |
static | _bin ($hex) |
Documentation des fonctions membres
static JUserHelper::_bin |
( |
|
$hex | ) |
|
|
staticprivate |
Converts hexadecimal string to binary data.
- Paramètres:
-
- Renvoie:
- string Binary data.
- Depuis:
- 11.1
Références $i.
Référencé par getCryptedPassword().
static JUserHelper::_toAPRMD5 |
( |
|
$value, |
|
|
|
$count |
|
) |
| |
|
staticprotected |
Converts to allowed 64 characters for APRMD5 passwords.
- Paramètres:
-
string | $value | The value to convert. |
integer | $count | The number of characters to convert. |
- Renvoie:
- string $value converted to the 64 MD5 characters.
- Depuis:
- 11.1
Références $count.
Référencé par getCryptedPassword().
static JUserHelper::activateUser |
( |
|
$activation | ) |
|
|
static |
static JUserHelper::addUserToGroup |
( |
|
$userId, |
|
|
|
$groupId |
|
) |
| |
|
static |
static JUserHelper::genRandomPassword |
( |
|
$length = 8 | ) |
|
|
static |
static JUserHelper::getCryptedPassword |
( |
|
$plaintext, |
|
|
|
$salt = '' , |
|
|
|
$encryption = 'md5-hex' , |
|
|
|
$show_encrypt = false |
|
) |
| |
|
static |
Formats a password using the current encryption.
- Paramètres:
-
string | $plaintext | The plaintext password to encrypt. |
string | $salt | The salt to use to encrypt the password. [] If not present, a new salt will be generated. |
string | $encryption | The kind of password encryption to use. Defaults to md5-hex. |
boolean | $show_encrypt | Some password systems prepend the kind of encryption to the crypted password ({SHA}, etc). Defaults to false. |
- Renvoie:
- string The encrypted password.
- Depuis:
- 11.1
- Obsolète:
- 4.0
Références $i, _bin(), _toAPRMD5(), et getSalt().
Référencé par UsersModelReset\processResetConfirm().
static JUserHelper::getProfile |
( |
|
$userId = 0 | ) |
|
|
static |
static JUserHelper::getSalt |
( |
|
$encryption = 'md5-hex' , |
|
|
|
$seed = '' , |
|
|
|
$plaintext = '' |
|
) |
| |
|
static |
Returns a salt for the appropriate kind of password encryption. Optionally takes a seed and a plaintext password, to extract the seed of an existing password, or for encryption types that use the plaintext in the generation of the salt.
- Paramètres:
-
string | $encryption | The kind of password encryption to use. Defaults to md5-hex. |
string | $seed | The seed to get the salt from (probably a previously generated password). Defaults to generating a new seed. |
string | $plaintext | The plaintext password that we're generating a salt for. Defaults to none. |
- Renvoie:
- string The generated or extracted salt.
- Depuis:
- 11.1
Références $i.
Référencé par getCryptedPassword(), et UsersModelReset\processResetRequest().
static JUserHelper::getUserGroups |
( |
|
$userId | ) |
|
|
static |
static JUserHelper::getUserId |
( |
|
$username | ) |
|
|
static |
static JUserHelper::hashPassword |
( |
|
$password | ) |
|
|
static |
static JUserHelper::removeUserFromGroup |
( |
|
$userId, |
|
|
|
$groupId |
|
) |
| |
|
static |
static JUserHelper::setUserGroups |
( |
|
$userId, |
|
|
|
$groups |
|
) |
| |
|
static |
Method to set the groups for a user.
- Paramètres:
-
integer | $userId | The id of the user. |
array | $groups | An array of group ids to put the user in. |
- Renvoie:
- mixed Boolean true on success, Exception on error.
- Depuis:
- 11.1
Références $db, $i, $n, $query, $user, $userId, JFactory\getDbo(), JUser\getInstance(), JFactory\getUser(), et JArrayHelper\toInteger().
static JUserHelper::verifyPassword |
( |
|
$password, |
|
|
|
$hash, |
|
|
|
$user_id = 0 |
|
) |
| |
|
static |
Formats a password using the current encryption. If the user ID is given and the hash does not fit the current hashing algorithm, it automatically updates the hash.
- Paramètres:
-
string | $password | The plaintext password to check. |
string | $hash | The hash to verify against. |
integer | $user_id | ID of the user if the password hash should be updated |
- Renvoie:
- boolean True if the password and hash match, false otherwise
- Depuis:
- 3.2.1
Références $parts, $user, et JCrypt\timingSafeCompare().
Référencé par plgAuthenticationJoomla\onUserAuthenticate().
La documentation de cette classe a été générée à partir du fichier suivant :