\JUserHelper
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
Synopsis
class JUserHelper
{
- // methods
- public static boolean addUserToGroup()
- public static array getUserGroups()
- public static boolean removeUserFromGroup()
- public static boolean setUserGroups()
- public static getProfile()
- public static boolean activateUser()
- public static integer getUserId()
- public static string hashPassword()
- public static boolean verifyPassword()
- public static string getCryptedPassword()
- public static string getSalt()
- public static string genRandomPassword()
- protected static string _toAPRMD5()
- private static string _bin()
- public static boolean invalidateCookie()
- public static mixed clearExpiredTokens()
- public static mixed getRememberCookieData()
- public static string getShortHashedUserAgent()
Methods
private
- _bin() — Converts hexadecimal string to binary data.
protected
- _toAPRMD5() — Converts to allowed 64 characters for APRMD5 passwords.
public
- activateUser() — Method to activate a user
- addUserToGroup() — Method to add a user to a group.
- clearExpiredTokens() — Clear all expired tokens for all users.
- genRandomPassword() — Generate a random password
- getCryptedPassword() — Formats a password using the current encryption.
- getProfile() — Gets the user profile information
- getRememberCookieData() — Method to get the remember me cookie data
- getSalt() — Returns a salt for the appropriate kind of password encryption.
- getShortHashedUserAgent() — Method to get a hashed user agent string that does not include browser version.
- getUserGroups() — Method to get a list of groups a user is in.
- getUserId() — Returns userid if a user exists
- hashPassword() — Hashes a password using the current encryption.
- invalidateCookie() — Method to remove a cookie record from the database and the browser
- removeUserFromGroup() — Method to remove a user from a group.
- setUserGroups() — Method to set the groups for a user.
- verifyPassword() — 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.