com.woltlab.wcf.data.user
User class defines all functions to "get" the information (data) of a user. It is a reading class only.
This class provides all necessary functions to "read" all possible userdata. This includes required data and optional data. To set this userdata read the documentation of UserEditor.class.php which extends User.class.php
DatabaseObject | --User
| Class | Description |
|---|---|
UserEditor |
UserEditor creates, edits or deletes users. |
UserSession |
Class for user session handling. Fewer database queries through cached data in session table (user object). |
| Type | Name |
|---|---|
mixed |
$groupIDs |
mixed |
$sqlGroupBy |
mixed |
$sqlJoins |
mixed |
$sqlSelects |
static mixed |
$userOptions |
| Return | Name |
|---|---|
User |
__construct(string $userID, [array $row = null], [string $username = null], [string $email = null])
|
boolean |
checkCookiePassword(string $passwordHash)
|
boolean |
checkPassword(string $password)
|
UserEditor |
getEditor()
|
array |
getGroupIDs()
|
static User |
getNewest()
|
string |
getSalt()
|
mixed |
getUserOption(string $name)
|
static void |
getUserOptionCache()
|
static integer |
getUserOptionID(string $name)
|
static array |
getUsers(string $userIDs)
|
void |
handleData( $data)
|
void |
__get( $name)
|
void |
__toString()
|
protected mixed $groupIDs = null
protected mixed $sqlGroupBy = ''
protected mixed $sqlJoins = ''
protected mixed $sqlSelects = ''
protected static mixed $userOptions = null
public User __construct(string $userID, [array $row = null], [string $username = null], [string $email = null])
Gets the main data of the passed user (id, name or whole datablock) and pass it over to the "protected function initUser()".
You can also create an emtpy user object e.g. to search for users.
$userID $row $username $email Redefinition of: DatabaseObject::__construct()
Redefined in descendants as: UserSession::__construct(), WBBUserSession::__construct(), UserProfile::__construct(), WBBUser::__construct()
public boolean checkCookiePassword(string $passwordHash)
Returns true, if the given password hash from a cookie is the correct password for this user.
$passwordHash public boolean checkPassword(string $password)
Returns true, if the given password is the correct password for this user.
$password public UserEditor getEditor()
Returns a UserEditor object to edit this user.
public array getGroupIDs()
Returns an array with the all the groups in which the actual user is a member.
public static User getNewest()
Gets the user with the highest registration date timestamp from database and returns a new user object with his data.
public string getSalt()
Returns the salt of the user password.
public mixed getUserOption(string $name)
Returns the value of the user option with the given name.
$name - user option name protected static void getUserOptionCache()
Gets all user options from cache.
public static integer getUserOptionID(string $name)
Returns the id of a user option.
$name public static array getUsers(string $userIDs)
Returns a list of users.
$userIDs protected void handleData( $data)
$data Redefinition of: DatabaseObject::handleData()
Redefined in descendants as: UserSession::handleData(), WBBUserSession::handleData(), UserProfile::handleData()
public void __get( $name)
public void __toString()
alias of the getUsername() function
DatabaseObject::__construct(), DatabaseObject::handleData(), DatabaseObject::sort(), DatabaseObject::__get()