How get custom user fields in a plugin? How get the custom user fields in a plugin? I can get the normal fields like firstName like this craft()-&gt;userSession-&gt;user-&gt;firstName but how i can get a custom field i tried craft()-&gt;userSession-&gt;user-&gt;customfieldname but that doesn't work.
The UserSessionService::getUser method returns a UserModel.

You can retrieve the custom fields from a UserModel as follows:

$userModel-&gt;getContent()-&gt;getAttribute('fieldName');


Or, following on from your example:

craft()-&gt;userSession-&gt;getUser()-&gt;getContent()-&gt;getAttribute('fieldName');