Open Tam opened 8 years ago
Check out this answer:
http://craftcms.stackexchange.com/a/16265/153
You'll have to make some adjustments. ie. check for a particular field handle (name?) and get your manipulations inside the foreach loop. Are you importing into a table by chance?
If you are setting the default firstName
and lastName
fields on a UserModel, you can't do that using setContentFromPost()
.
Instead, try setting them directly on the $element
like this:
$element->firstName = $name[0];
$element->lastName = $name[1];
I'm trying to import some users and I have this modify in my business logic plugin:
The users are importing successfully, and the hook is running (I can
::log
from it) but none of the modifications take effect. I'm not getting any errors (checked log files & craft_import_log table).