# $field->toUser()

Converts a user email address to a user object

****

- Source: <https://github.com/getkirby/kirby/tree/5.5.3/config/methods.php#L314>

****

```php
$field->toUser(): Kirby\Cms\User|null
```

## Return types

`Kirby\Cms\User` or `null`

This method modifies the existing `$field` object it is applied to and returns it again.


## Examples

### Text file

```kirbycontent
Title: My great article
----
Author: - user://hqq2mn9k
```

### Template
```php

<?php if ($author = $page->author()->toUser()): ?>
<aside class="author">
  <h2><?= $author->name() ?></h2>
  <?= $author->bio()->kirbytext() ?>
</aside>
<?php endif ?>
```