Alternative to: Add additional key-value to kirby()->user() programaticaly

Hey there…
i want to add additional user-based Informations from an external database, which i can use globaly…

My first thought was: just add them to the kirby()->user()-object… but @texnixe said in here, that this is not possible: Adding a new entry (key and value) to a collection / object - #7 by texnixe

So, i have to create a new object? I am new to this… where/how do i create an object based on user-specific data from a database, which is also updated on new login and globaly usable?

(in my case i use a frontend-login via LDAP login | Kirby CMS and i want to add additional user-information to each user from a postgres-DB)

thx in a advance

You can use $user->update()to update your user.

thx a lot… this is interesting… didn’t know of. Had to play with impersonate, too.
again i learned much, just by helpfull small hint by @texnixe :wink: :+1: