user() function
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.
Please note this method is and thus not intended to be called directly.
Internal usage
// basic internal usage
$user = user();
// internal 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.251