Kirby 2 used to save the username in the page content when you had a field of type “user”. As stated in the migration guide, I replaced the field by the new “users” field. However this one seems to save the user email and not the username in the content.
All the existing fields in the panel are blank because it doesn’t seems to be able to match the username with an existing user. Did I miss something or do I have to replace all usernames by emails in my existing content?
Since the user name will no longer be unique (or not even stored anymore for new users) as Kirby now uses the email address, yes, you would have to update your files.
Thanks Flo, but that unfortunately doesn’t help with replacing references to users throughout the content. Maybe we should write a little script for that goes through all files and replace usernames with their email addresses…
@LeBen
We have a first version: https://getkirby.com/docs/cookbook/migration/users#update-user-fields
Would you be so kind and test if it works for you? Please make sure to have a complete backup of your site before running the script. There could be an error and we don’t want that your data gets lost.
@distantnative It looks like there is a bug which might not be related to the script but to Kirby in general.
Running the script removes the “title” when updating pages. It seems to happen only on the primary language though, translations of the page still have their title. Any idea what’s going on?
Let me know if I should open an issue in the Github repo.