User methods are registered with the
For a full list of default user methods, please check out the Reference.
You can extend the set of defined user methods in a plugin file.
This example shows the basic architecture of a user method. You define the method name with the key for the
userMethods extension array.
$this in the callback function refers to the
In some cases it might be helpful to be able to pass arguments to the method:
You can define arguments for a method like this:
And then use it like this:
<?= $user->greetUser('Dear') ?>