We are building a simple user import plugin, saving the basic user is easy enough but how does one save data to the custom fields added to users
$user = new UserModel(); $user->status = UserStatus::Active; $user->firstName = 'Fruit'; $user->lastName = 'Studios'; $user->email = 'firstname.lastname@example.org'; craft()->users->saveUser($user);
This all works great but i cant work out how I add the custom fields?? The following will abviously not work because 'postCode' is not part of the User Model:
$user->postCode = 'SO23 9UG';
Where am I going wrong?