public
boolean
|
#
addUserToGroup( integer $userId, integer $groupId )
Helper wrapper method for addUserToGroup
Helper wrapper method for addUserToGroup
Parameters
- $userId
integer - $userId The id of the user.
- $groupId
integer - $groupId The id of the group.
Returns
boolean - True on success
Throws
Since
3.4
See
|
public
array
|
#
getUserGroups( integer $userId )
Helper wrapper method for getUserGroups
Helper wrapper method for getUserGroups
Parameters
- $userId
integer - $userId The id of the user.
Returns
array - List of groups
Since
3.4
See
|
public
boolean
|
#
removeUserFromGroup( integer $userId, integer $groupId )
Helper wrapper method for removeUserFromGroup
Helper wrapper method for removeUserFromGroup
Parameters
- $userId
integer - $userId The id of the user.
- $groupId
integer - $groupId The id of the group.
Returns
boolean - True on success
Since
3.4
See
|
public
boolean
|
#
setUserGroups( integer $userId, array $groups )
Helper wrapper method for setUserGroups
Helper wrapper method for setUserGroups
Parameters
- $userId
integer - $userId The id of the user.
- $groups
array - $groups An array of group ids to put the user in.
Returns
boolean - True on success
Since
3.4
See
|
public
object
|
#
getProfile( integer $userId = 0 )
Helper wrapper method for getProfile
Helper wrapper method for getProfile
Parameters
- $userId
integer - $userId The id of the user.
Returns
object
Since
3.4
See
|
public
boolean
|
#
activateUser( string $activation )
Helper wrapper method for activateUser
Helper wrapper method for activateUser
Parameters
- $activation
string - $activation Activation string
Returns
boolean - True on success
Since
3.4
See
|
public
integer
|
#
getUserId( string $username )
Helper wrapper method for getUserId
Helper wrapper method for getUserId
Parameters
- $username
string - $username The username to search on.
Returns
integer - The user id or 0 if not found.
Since
3.4
See
|
public
string
|
#
hashPassword( string $password )
Helper wrapper method for hashPassword
Helper wrapper method for hashPassword
Parameters
- $password
string - $password The plaintext password to encrypt.
Returns
string - The encrypted password.
Since
3.4
See
|
public
boolean
|
#
verifyPassword( string $password, string $hash, integer $user_id = 0 )
Helper wrapper method for verifyPassword
Helper wrapper method for verifyPassword
Parameters
- $password
string - $password The plaintext password to check.
- $hash
string - $hash The hash to verify against.
- $user_id
integer - $user_id ID of the user if the password hash should be updated
Returns
boolean - True if the password and hash match, false otherwise
Since
3.4
See
|
public
string
|
#
getCryptedPassword( string $plaintext, string $salt = '', string $encryption = 'md5-hex', boolean $show_encrypt = false )
Helper wrapper method for getCryptedPassword
Helper wrapper method for getCryptedPassword
Deprecated
4.0
Parameters
- $plaintext
string - $plaintext The plaintext password to encrypt.
- $salt
string - $salt The salt to use to encrypt the password. [] If not present, a new salt
will be generated.
- $encryption
string - $encryption The kind of password encryption to use. Defaults to md5-hex.
- $show_encrypt
boolean - $show_encrypt Some password systems prepend the kind of encryption to the
crypted password ({SHA}, etc). Defaults to false.
Returns
string - The encrypted password.
Since
3.4
See
|
public
string
|
#
getSalt( string $encryption = 'md5-hex', string $seed = '', string $plaintext = '' )
Helper wrapper method for getSalt
Helper wrapper method for getSalt
Deprecated
4.0
Parameters
- $encryption
string - $encryption The kind of password encryption to use. Defaults to md5-hex.
- $seed
string - $seed The seed to get the salt from (probably a previously generated password).
Defaults to generating a new seed.
- $plaintext
string - $plaintext The plaintext password that we're generating a salt for. Defaults to
none.
Returns
string - The generated or extracted salt.
Since
3.4
See
|
public
string
|
#
genRandomPassword( integer $length = 8 )
Helper wrapper method for genRandomPassword
Helper wrapper method for genRandomPassword
Parameters
- $length
integer - $length Length of the password to generate
Returns
string - Random Password
Since
3.4
See
|
public
boolean
|
#
invalidateCookie( string $userId, string $cookieName )
Helper wrapper method for invalidateCookie
Helper wrapper method for invalidateCookie
Deprecated
4.0
Parameters
- $userId
string - $userId User ID for this user
- $cookieName
string - $cookieName Series id (cookie name decoded)
Returns
boolean - True on success
Since
3.4
See
|
public
mixed
|
#
clearExpiredTokens( )
Helper wrapper method for clearExpiredTokens
Helper wrapper method for clearExpiredTokens
Deprecated
4.0
Returns
mixed - Database query result
Since
3.4
See
|
public
mixed
|
#
getRememberCookieData( )
Helper wrapper method for getRememberCookieData
Helper wrapper method for getRememberCookieData
Deprecated
4.0
Returns
mixed - An array of information from an authentication cookie or false if there is no
cookie
Since
3.4
See
|
public
string
|
#
getShortHashedUserAgent( )
Helper wrapper method for getShortHashedUserAgent
Helper wrapper method for getShortHashedUserAgent
Returns
string - A hashed user agent string with version replaced by 'abcd'
Since
3.4
See
|