This code worked (at least for some beat versions) but does not work anymore!? I know there was a bug for disabled fields but even without disabled: true it does not work.
When I change this line
'author' => $this->user()->email()
to
'text' => $this->user()->email()
the textfield of the page is filled with kirby@getkirby.com. So the hook itself works, but $site->user() does not return the current user and the users field does not accept the value?!
Am I right that according to your post (24th January), the example below should set the default value to the currently logged in user @texnixe?
author:
type: users
required: true
default: none
The default: none part doesn’t work like that in the latest release. If I remove it, the current user is set properly due to the required part. If this is a bug, I can open an issue on Github.