$field->toUsers()
Returns a users collection from a yaml list of user email addresses in the field
$field->toUsers(string $separator = 'yaml'): Users
Parameters
| Name | Type | Default |
|---|---|---|
| $separator | string |
'yaml'
|
Return type
Examples
<ul class="authors">
<?php foreach ($page->authors()->toUsers() as $author): ?>
<li>
<h2><?= $author->name() ?></h2>
<?= $author->bio()->kirbytext() ?>
</li>
<?php endforeach ?>
</ul>