We are importing a data from a source, which doesn't return a username. Only an email.
Our Drupal site uses the email_registration module.
So we need a migrate process plugin, which will convert the email to a user name in same way as email_registration does.

Comments

max-kuzomko created an issue. See original summary.

max-kuzomko’s picture

Assigned: max-kuzomko » Unassigned
Status: Active » Needs review
StatusFileSize
new1.26 KB
abramm’s picture

Username uniqueness should be handled by Migrate itself and not by process plugin.

Attaching the patch + interdiff.

andypost’s picture

greggles’s picture

Title: Add a migrate process plugin for username » Add a migrate process plugin to turn email into username for source without username
Category: Task » Feature request

If I understand this correctly, it would be useful on a site that is importing from a source that doesn't have a username. That source is likely not Drupal, and this feature is useful even on a site that eventually won't use email_registration. It feels like this might belong in something like a "migrate extras" kind of module?

greggles’s picture

Just bumping this in case anyone has feedback on my question in #5?

On the one hand - code that is only mildly related tends to decay and become buggy. On the other hand, this does seem generally useful and at least somewhat related to this module.

jnettik’s picture

Status: Needs review » Reviewed & tested by the community

I've reviewed this and it looks good to me.

  • greggles committed d5e3db6 on 8.x-1.x authored by abramm
    Issue #2953246 by abramm, max-kuzomko, greggles, jnettik: Add a migrate...
greggles’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +dcco2019

Thanks for your work and reviews!

Status: Fixed » Closed (fixed)

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