UserWrapper

Wrapper class for UserHelper

deprecated
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Methods

activateUser

Helper wrapper method for activateUser

activateUser(string $activation) : boolean
deprecated
see \Joomla\CMS\User\UserHelper::activateUser()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

$activation

stringActivation string

Response

booleanTrue on success

addUserToGroup

Helper wrapper method for addUserToGroup

addUserToGroup(integer $userId, integer $groupId) : boolean
deprecated
see \Joomla\CMS\User\UserHelper::addUserToGroup()
since

3.4

throws

\RuntimeException

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

$userId

integerThe id of the user.

$groupId

integerThe id of the group.

Response

booleanTrue on success

clearExpiredTokens

Helper wrapper method for clearExpiredTokens

clearExpiredTokens() : mixed
deprecated
see \Joomla\CMS\User\UserHelper::clearExpiredTokens()
since

3.4

deprecated

4.0

Response

mixedDatabase query result

genRandomPassword

Helper wrapper method for genRandomPassword

genRandomPassword(integer $length = 8) : string
deprecated
see \Joomla\CMS\User\UserHelper::genRandomPassword()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

$length

integerLength of the password to generate

Response

stringRandom Password

getCryptedPassword

Helper wrapper method for getCryptedPassword

getCryptedPassword(string $plaintext, string $salt = '', string $encryption = 'md5-hex', boolean $show_encrypt = false) : string
deprecated
see \Joomla\CMS\User\UserHelper::getCryptedPassword()
since

3.4

deprecated

4.0

Arguments

$plaintext

stringThe plaintext password to encrypt.

$salt

stringThe salt to use to encrypt the password. [] If not present, a new salt will be generated.

$encryption

stringThe kind of password encryption to use. Defaults to md5-hex.

$show_encrypt

booleanSome password systems prepend the kind of encryption to the crypted password ({SHA}, etc). Defaults to false.

Response

stringThe encrypted password.

getProfile

Helper wrapper method for getProfile

getProfile(integer $userId) : object
deprecated
see \Joomla\CMS\User\UserHelper::getProfile()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

$userId

integerThe id of the user.

Response

object

getRememberCookieData

Helper wrapper method for getRememberCookieData

getRememberCookieData() : mixed
deprecated
see \Joomla\CMS\User\UserHelper::getRememberCookieData()
since

3.4

deprecated

4.0

Response

mixedAn array of information from an authentication cookie or false if there is no cookie

getSalt

Helper wrapper method for getSalt

getSalt(string $encryption = 'md5-hex', string $seed = '', string $plaintext = '') : string
deprecated
see \Joomla\CMS\User\UserHelper::getSalt()
since

3.4

deprecated

4.0

Arguments

$encryption

stringThe kind of password encryption to use. Defaults to md5-hex.

$seed

stringThe seed to get the salt from (probably a previously generated password). Defaults to generating a new seed.

$plaintext

stringThe plaintext password that we're generating a salt for. Defaults to none.

Response

stringThe generated or extracted salt.

getShortHashedUserAgent

Helper wrapper method for getShortHashedUserAgent

getShortHashedUserAgent() : string
deprecated
see \Joomla\CMS\User\UserHelper::getShortHashedUserAgent()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Response

stringA hashed user agent string with version replaced by 'abcd'

getUserGroups

Helper wrapper method for getUserGroups

getUserGroups(integer $userId) : array
deprecated
see \Joomla\CMS\User\UserHelper::addUserToGroup()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

$userId

integerThe id of the user.

Response

arrayList of groups

getUserId

Helper wrapper method for getUserId

getUserId(string $username) : integer
deprecated
see \Joomla\CMS\User\UserHelper::getUserId()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

$username

stringThe username to search on.

Response

integerThe user id or 0 if not found.

hashPassword

Helper wrapper method for hashPassword

hashPassword(string $password, integer $algorithm = PASSWORD_BCRYPT, array $options = array()) : string
deprecated
see \Joomla\CMS\User\UserHelper::hashPassword()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

$password

stringThe plaintext password to encrypt.

$algorithm

integerThe hashing algorithm to use, represented by PASSWORD_* constants.

$options

arrayThe options for the algorithm to use.

Response

stringThe encrypted password.

invalidateCookie

Helper wrapper method for invalidateCookie

invalidateCookie(string $userId, string $cookieName) : boolean
deprecated
see \Joomla\CMS\User\UserHelper::invalidateCookie()
since

3.4

deprecated

4.0

Arguments

$userId

stringUser ID for this user

$cookieName

stringSeries id (cookie name decoded)

Response

booleanTrue on success

removeUserFromGroup

Helper wrapper method for removeUserFromGroup

removeUserFromGroup(integer $userId, integer $groupId) : boolean
deprecated
see \Joomla\CMS\User\UserHelper::removeUserFromGroup()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

$userId

integerThe id of the user.

$groupId

integerThe id of the group.

Response

booleanTrue on success

setUserGroups

Helper wrapper method for setUserGroups

setUserGroups(integer $userId, array $groups) : boolean
deprecated
see \Joomla\CMS\User\UserHelper::setUserGroups()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

$userId

integerThe id of the user.

$groups

arrayAn array of group ids to put the user in.

Response

booleanTrue on success

verifyPassword

Helper wrapper method for verifyPassword

verifyPassword(string $password, string $hash, integer $user_id) : boolean
deprecated
see \Joomla\CMS\User\UserHelper::verifyPassword()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

$password

stringThe plaintext password to check.

$hash

stringThe hash to verify against.

$user_id

integerID of the user if the password hash should be updated

Response

booleanTrue if the password and hash match, false otherwise