User import

{if $processPoint eq 'pre'}

Step 1

Please supply a CSV file with the following columns in order. All columns must be supplied, but only those marked with a * must be populated.

Additionally, custom fields can be specified as follows, as many as are required:

<name> can include spaces.

{elseif $processPoint eq 'check'}

Step 2

Users found

{foreach from=$userObjects item=userObj}
{$userObj->data.user_firstname} {$userObj->data.user_lastname} {$userObj->data.user_email} {if isset($failedUserEmails[$userObj->get('email')])}
ERRORS FOR {$userObj->data.user_email} {foreach $failedUserEmails[$userObj->get('email')]->message as $error}

{$error|var_dump}

{/foreach}
{/if}
{foreachelse}
None.
{/foreach}

The following custom fields will be created

{foreach from=$enumObjects item=nce}
{$nce->data['userfield_name']} - ({$nce->data['userfield_options']}) {if isset($failedFieldNames[$nce->get('name')])}
ERRORS FOR {$nce->data.userfield_name} {foreach $failedFieldNames[$nce->get('name')] as $error}

{$error|var_dump}

{/foreach}
{/if}
{/foreach} {foreach from=$textObjects item=nce}
{$nce->data['userfield_name']} {if isset($failedFieldNames[$nce->get('name')])}
ERRORS FOR {$nce->data.userfield_name} {foreach $failedFieldNames[$nce->get('name')] as $error}

{$error|var_dump}

{/foreach}
{/if}
{/foreach}

The following fields already exist

{foreach from=$fieldCompare.existing item=cfe}
{$cfe->data.userfield_name}
{foreachelse}
None.
{/foreach}
Only do this if there are no errors
{elseif $processPoint eq 'run'}

Step 3

{foreach from=$failedUsers item=emailAddr}
Failed: {$emailAddr}
{/foreach}

Assuming all went to plan, everything should be imported!

{/if}