UserWrapper

Wrapper class for UserHelper

deprecated
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

package

Joomla CMS

Methods

activateUser

Helper wrapper method for activateUser

activateUser(string activation) : bool
deprecated
see UserHelper::activateUser()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

activation

stringActivation string

Response

boolTrue on success

addUserToGroup

Helper wrapper method for addUserToGroup

addUserToGroup(int userId, int groupId) : bool
deprecated
see UserHelper::addUserToGroup()
since

3.4

throws

\RuntimeException

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

userId

intThe id of the user.

groupId

intThe id of the group.

Response

boolTrue on success

clearExpiredTokens

Helper wrapper method for clearExpiredTokens

clearExpiredTokens() : mixed
deprecated
see UserHelper::clearExpiredTokens()
since

3.4

deprecated

4.0

Response

mixedDatabase query result

genRandomPassword

Helper wrapper method for genRandomPassword

genRandomPassword(int length = 8) : string
deprecated
see UserHelper::genRandomPassword()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

length

intLength of the password to generate

Response

stringRandom Password

getCryptedPassword

Helper wrapper method for getCryptedPassword

getCryptedPassword(string plaintext, string salt = '', string encryption = 'md5-hex', bool showEncrypt = false) : string
deprecated
see 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.

showEncrypt

boolSome 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(int userId) : object
deprecated
see UserHelper::getProfile()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

userId

intThe id of the user.

Response

object

getRememberCookieData

Helper wrapper method for getRememberCookieData

getRememberCookieData() : mixed
deprecated
see 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 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 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(int userId) : array
deprecated
see UserHelper::addUserToGroup()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

userId

intThe id of the user.

Response

arrayList of groups

getUserId

Helper wrapper method for getUserId

getUserId(string username) : int
deprecated
see UserHelper::getUserId()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

username

stringThe username to search on.

Response

intThe user id or 0 if not found.

hashPassword

Helper wrapper method for hashPassword

hashPassword(string password, int algorithm = PASSWORD_BCRYPT, array options = array()) : string
deprecated
see UserHelper::hashPassword()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

password

stringThe plaintext password to encrypt.

algorithm

intThe 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) : bool
deprecated
see UserHelper::invalidateCookie()
since

3.4

deprecated

4.0

Arguments

userId

stringUser ID for this user

cookieName

stringSeries id (cookie name decoded)

Response

boolTrue on success

removeUserFromGroup

Helper wrapper method for removeUserFromGroup

removeUserFromGroup(int userId, int groupId) : bool
deprecated
see UserHelper::removeUserFromGroup()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

userId

intThe id of the user.

groupId

intThe id of the group.

Response

boolTrue on success

setUserGroups

Helper wrapper method for setUserGroups

setUserGroups(int userId, array groups) : bool
deprecated
see UserHelper::setUserGroups()
since

3.4

deprecated

4.0 Use Joomla\CMS\User\UserHelper directly

Arguments

userId

intThe id of the user.

groups

arrayAn array of group ids to put the user in.

Response

boolTrue on success

verifyPassword

Helper wrapper method for verifyPassword

verifyPassword(string password, string hash, int userId) : bool
deprecated
see 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.

userId

intID of the user if the password hash should be updated

Response

boolTrue if the password and hash match, false otherwise