Users methods are registered with the
For a full list of default users methods, please check out the Reference.
Be aware that you cannot override these default users methods with any custom users method.
You can extend the set of defined users methods in a plugin file.
This example shows the basic architecture of a users method. You define the method name with the key for the
usersMethods extension array.
$this in the callback function refers to the
The example will return all users where the
articles field is not empty.
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:
This example will return all users with video post type articles.