I extended the fe_user-model with some custom properties and want to encrypt the data (string) on persistence. Of course, the data should be decrypted on retrieval. I think a custom type converter is an option. I just can’t find how to apply the converter to my custom properties.
With suggest a TypeConverter you will get all data - you might want to extend the defaut PersistentObjectConverter instead.
Alternatively, the AfterObjectThawedEvent could be a good choice - you can most likely touch only the single properties needed
Working with encrypted data in the backend
If working from the backend with similar data, I have a field myself that I encrypt via a formevals like this
Thank you for hinting to the AfterObjectThawedEvent. This would make decrypting the data very easy. However, it seems, that a listener to this event can see but not manipulate the data.
I am not sure if this is a bug or intended, but the eventDispatcher doesn’t return any data:
I don’t need to obfuscate the data in the backend.