$field->toUsers()
Returns a users collection from a yaml list of user email addresses in the field
$field->toUsers(string $separator = 'yaml'): Kirby\Cms\Users
Parameters
Name | Type | Default |
---|---|---|
$separator | string |
'yaml'
|
Return type
This method modifies the existing $field
object it is applied to and returns it again.
Examples
<ul class="authors">
<?php foreach ($page->authors()->toUsers() as $author): ?>
<li>
<h2><?= $author->name() ?></h2>
<?= $author->bio()->kirbytext() ?>
</li>
<?php endforeach ?>
</ul>