It would be good to have support for the migrate module for migrating data into profile2_privacy fields.

CommentFileSizeAuthor
#2 profile2_privacy-2205133-2.patch1.13 KBrooby

Comments

rooby’s picture

Status: Active » Needs review

Here is a patch that adds support for the profile2_privacy field.

It is a basic field so usage is just like any other field.

For example:

<?php
    // Profile2_privacy field.
    // The field expects a pplid.
    $this->addFieldMapping('field_profile_visibility', 'profile_visibility')
      ->defaultValue(2)
      ->description(t("The user's profile visibility."));
?>
rooby’s picture

StatusFileSize
new1.13 KB

Damn it. Here is the patch.

jhedstrom’s picture

Since this is unlikely to get other reviewers, if you can confirm this is working I see no problem adding this to the module.

rooby’s picture

I've used it on one migration and it worked aok.

mariacha1’s picture

Status: Needs review » Fixed

Patch pushed (with a quick doc-block add to pacify phpcs).

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.