Get the currently logged in user ($user API variable as a function)
This function behaves the same as the $user
API variable, though does support
optional shortcut arguments for getting or setting values.
Usage
// basic usage
$user = user();
// usage with all arguments
$user = user(string $key = '', null $value = null);
Arguments
Name | Type(s) | Description |
---|---|---|
key (optional) | string | Optional property to get or set |
value (optional) | null | Optional value to set |
Return value
User
mixed
Functions methods and properties
API reference based on ProcessWire core version 3.0.236