sorry folks, I know I am resurrecting a rather old thread....
what is em()? in my setup step (XF2.2) I get an undefined on it. I cannot quite figure out how to create it.
I'm trying to add a custom user field as part of the setup. I can do it through data but that's not polite
It always depends on the context. A lot of XenForo objects have quick access methods or properties for the app and entity manager available. If not, you can always get it via \XF::em() when you require it, as the post before your first gave as example.