User methods
User methods are registered with the userMethods
extension.
Default user methods
For a full list of default user methods, please check out the Reference.
Be aware that you cannot override these default user methods with any custom user method. If you want to override default methods, you can use a user model instead.
Getting started
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 $user
object.
Working with method arguments
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: