Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
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=PASSWORD_BCRYPT, array $options=array()) |
static | verifyPassword ($password, $hash, $userId=0) |
static | getCryptedPassword ($plaintext, $salt='', $encryption='md5-hex', $showEncrypt=false) |
static | getSalt ($encryption='md5-hex', $seed='', $plaintext='') |
static | genRandomPassword ($length=8) |
static | invalidateCookie ($userId, $cookieName) |
static | clearExpiredTokens () |
static | getRememberCookieData () |
static | getShortHashedUserAgent () |
static | checkSuperUserInUsers (array $userIds) |
static | destroyUserSessions ($userId, $keepCurrent=false, $clientId=null) |
Fonctions membres protégées statiques | |
static | _toAPRMD5 ($value, $count) |
Fonctions membres privées statiques | |
static | _bin ($hex) |
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
|
staticprivate |
|
staticprotected |
|
static |
Method to activate a user
string | $activation | Activation string |
Références User\$activation, $db, User\$id, $query, $user, et User\getInstance().
Référencé par UserWrapper\activateUser().
|
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, $user, $userId, User\getInstance(), et null.
Référencé par UserWrapper\addUserToGroup().
|
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().
|
static |
Clear all expired tokens for all users.
Références $db, $now, et $query.
Référencé par UserWrapper\clearExpiredTokens().
Destroy all active session for a given user id
int | $userId | Id of user |
boolean | $keepCurrent | Keep the session of the currently acting user |
int | $clientId | Application client id |
Références $clientId, $db, $query, $userId, et null.
Référencé par UsersModelUser\block(), PlgPrivacyUser\onPrivacyRemoveData(), et UsersModelUser\save().
|
static |
Generate a random password
integer | $length | Length of the password to generate |
Référencé par Session\_createToken(), et UserWrapper\genRandomPassword().
|
static |
Formats a password using the old encryption methods.
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 | $showEncrypt | Some password systems prepend the kind of encryption to the crypted password ({SHA}, etc). Defaults to false. |
Référencé par UserWrapper\getCryptedPassword().
|
static |
Gets the user profile information
integer | $userId | The id of the user. |
Références $data, $dispatcher, $user, $userId, JEventDispatcher\getInstance(), et PluginHelper\importPlugin().
Référencé par UserWrapper\getProfile().
|
static |
Method to get the remember me cookie data
Références $app.
Référencé par UserWrapper\getRememberCookieData().
|
static |
Returns a salt for the appropriate kind of password encryption using the old encryption methods. 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.
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. |
Références $i.
Référencé par UserWrapper\getSalt().
|
static |
Method to get a hashed user agent string that does not include browser version. Used when frequent version changes cause problems.
Référencé par UserWrapper\getShortHashedUserAgent().
|
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 UserWrapper\getUserGroups().
|
static |
Returns userid if a user exists
string | $username | The username to search on. |
Références $db, $query, et User\$username.
Référencé par UserWrapper\getUserId().
|
static |
Hashes a password using the current encryption.
string | $password | The plaintext password to encrypt. |
integer | $algorithm | The hashing algorithm to use, represented by PASSWORD_* constants. |
array | $options | The options for the algorithm to use. |
Références $options, et User\$password.
Référencé par UserWrapper\hashPassword().
|
static |
Method to remove a cookie record from the database and the browser
string | $userId | User ID for this user |
string | $cookieName | Series id (cookie name decoded) |
Références $app, $db, $query, et $userId.
Référencé par UserWrapper\invalidateCookie().
|
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, $user, $userId, et User\getInstance().
Référencé par UserWrapper\removeUserFromGroup().
|
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, $user, $userId, User\getInstance(), et ArrayHelper\toInteger().
Référencé par UserWrapper\setUserGroups().
|
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.
string | $password | The plaintext password to check. |
string | $hash | The hash to verify against. |
integer | $userId | ID of the user if the password hash should be updated |
Références $hash, $parts, User\$password, $user, $userId, et elseif.
Référencé par UserWrapper\verifyPassword().