$user / User
The $user API variable is a type of page representing the current user, and the User class is Page type used for all users.
Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the User
class also inherits all the methods and properties of: Page, WireData and Wire.
Common
Name | Return | Summary | |
---|---|---|---|
$user->changed() $user->changed(string $what) $user->changed(string $what, mixed $old = null, mixed $new = null) | None | Hook called when field has changed | |
$user->get() $user->get(string $key) $user->get(string $key) | null mixed | Get value | |
$user->roles | PageArray | Get the roles this user has. | |
$user->setEditor() $user->setEditor(WirePageEditor $editor) $user->setEditor(WirePageEditor $editor) | None | Set the Process module (WirePageEditor) that is editing this User |
Access
Languages
Name | Return | Summary | |
---|---|---|---|
$user->language | Language | User language, applicable only if LanguageSupport installed. | |
$user->setLanguage() $user->setLanguage($language) $user->setLanguage($language) | self | Set language for user (quietly) |
Properties
Name | Return | Summary | Default |
---|---|---|---|
$user->admin_theme | string | Admin theme class name (when applicable). | |
$user->email | string | Get or set email address for this user. | |
$user->pass | string Password | Set the user’s password. |
Additional methods and properties
In addition to the methods and properties above, User also inherits the methods and properties of these classes:
API reference based on ProcessWire core version 3.0.251