Commit 86d476fc authored by Nigel McNie's avatar Nigel McNie
Browse files

Don't create an e-mail address for users in the prototype importer.



We get one (or more) from the import file now.
Signed-off-by: default avatarNigel McNie <nigel@catalyst.net.nz>
parent ced0841c
...@@ -100,7 +100,6 @@ function import_submit(Pieform $form, $values) { ...@@ -100,7 +100,6 @@ function import_submit(Pieform $form, $values) {
'password' => 'import1', 'password' => 'import1',
'firstname' => 'Imported', 'firstname' => 'Imported',
'lastname' => 'User (' . $nicedate .')', 'lastname' => 'User (' . $nicedate .')',
'email' => 'imported@example.org',
); );
$userid = create_user($user); $userid = create_user($user);
...@@ -125,11 +124,6 @@ function import_submit(Pieform $form, $values) { ...@@ -125,11 +124,6 @@ function import_submit(Pieform $form, $values) {
)); ));
$importer->process(); $importer->process();
// Now done, delete the temporary e-mail address if there's a new one
// A bit sucky, presumes only one email in the import
$email = artefact_instance_from_id(get_field('artefact', 'id', 'title', 'imported@example.org', 'artefacttype', 'email', 'owner', $userid));
$email->delete();
execute_sql('UPDATE {artefact_internal_profile_email} SET principal = 1 WHERE "owner" = ?', array($userid));
db_commit(); db_commit();
echo "\n\n"; echo "\n\n";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment