$users
The $users
object refers to a collection of users with or without Panel access. Like all collections, you can filter, modify, convert or check the users collection.
-
$users->add()
-
$users->append()
-
$users->callMethod()
-
$users->chunk()
-
$users->clone()
-
$users->count()
-
$users->create()
-
$users->current()
-
$users->data()
-
$users->empty()
-
$users->extend()
-
$users->files()
-
$users->filter()
-
$users->filterBy()
-
$users->find()
-
$users->findBy()
-
$users->findByKey()
-
$users->first()
-
$users->flip()
-
$users->get()
-
$users->getAttribute()
-
$users->getIterator()
-
$users->group()
-
$users->groupBy()
-
$users->has()
-
$users->hasMethod()
-
$users->indexOf()
-
$users->intersection()
-
$users->intersects()
-
$users->isEmpty()
-
$users->isEven()
-
$users->isNotEmpty()
-
$users->isOdd()
-
$users->key()
-
$users->keyOf()
-
$users->keys()
-
$users->last()
-
$users->limit()
-
$users->map()
-
$users->next()
-
$users->not()
-
$users->nth()
-
$users->offset()
-
$users->paginate()
-
$users->pagination()
-
$users->parent()
-
$users->pluck()
-
$users->prepend()
-
$users->prev()
-
$users->query()
-
$users->random()
-
$users->remove()
-
$users->rewind()
-
$users->role()
-
$users->search()
-
$users->set()
-
$users->shuffle()
-
$users->slice()
-
$users->sort()
-
$users->sortBy()
-
$users->toArray()
-
$users->toJson()
-
$users->toString()
-
$users->valid()
-
$users->values()
-
$users->when()
-
$users->without()
-
new Users()
-
Users::factory()
-
Users::load()
-
Users::sortArgs()
How to get a $users
object
The users object is available via the $kirby
object:
This will return a collection of all users of the site.
Examples
With the $users
object in place, you can now use all the methods of the class, for example:
Get all admin users
Fetch all values of a user field into an array
This will return an array with all the email adresses of all users.