$users->intersects()
Checks if there is an intersection between the given collection and this collection
$users->intersects(\Kirby\Toolkit\Collection $other): bool
Parameters
Name | Type | Default |
---|---|---|
$other * | Kirby\Toolkit\Collection |
– |
Return type
bool
Parent class
Kirby\Cms\Users
inherited from Kirby\Toolkit\Collection
Example
$users1 = $kirby->users()->role('admin');
$users2 = $page->authors()->toUsers();
if ($users1->intersects($users2) {
// do something
};