$users->has()
Checks if the given object or id is in the collection
$users->has(string|object $id): bool
Parameters
Name | Type | Default |
---|---|---|
$id * | string |object |
– |
Return type
bool
Parent class
Kirby\Cms\Users
inherited from Kirby\Cms\Collection
<?php if($kirby->users()->has('someone')): ?>
There exists a user with the username `someone`
<?php endif ?>