Closed (fixed)
Project:
CAS
Version:
8.x-1.x-dev
Component:
CAS
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Mar 2019 at 17:44 UTC
Updated:
29 Mar 2021 at 14:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
semiaddict commentedAttached is a patch that adds a migration for D7.
Comment #3
semiaddict commentedComment #4
epersonae2 commentedThis worked for me!
Things I needed to edit, that maybe deserves some documentation:
Add migration group to match the rest of my migration: migration_group: migrate_drupal_7
Edit migration reference, again to match the rest of the migration: d7_user to upgrade_d7_user
(I also edited the label just so it would appear next to the user migration in any status listings)
[note that these are the defaults if you use the baseline d7 > d8 migration configuration files as a starting point]
this is what I ended up as my working migration, minus the uuid:
Comment #5
byronveale commentedThe patch in #2 worked for me as well. I'm attaching a patch with a totally minor update, a "Content" tag.
Looking at the migration .yml file for the core user module, I see that migration id is "d7_user", so I left the required migration dependency alone. I also didn't include the migration group, as that seemed to be the established pattern for migration files in various core modules.
Comment #8
juampynr commentedI created a merge request using #5 and made the following adjustments:
* Changed users to d7_user as the migration to lookup for.
* Reworded a field description.
https://git.drupalcode.org/project/cas/-/merge_requests/1/diffs
Comment #9
paramnida commentedRe-rolling the patch in #5 with juampynr's changes (for ease of use if referencing the patch via Composer).
Comment #10
paramnida commentedOops. My re-roll didn't apply cleanly. This one hopefully should.
Comment #11
bkosborneThe D7 CAS module allows multiple CAS usernames to be associated with a single local Drupal account. The D8+ CAS module does not allow this. This will be a problem for any sites that had multiple CAS names for whatever reason. I'm not sure what the best approach is for addressing that. It will throw a database exception when it tries to migrate the 2nd CAS name for the same user. So maybe the user just needs to be aware it's not supported and the extra names must be dropped.
I think it's likely rare there are sites with multiple names, but I really don't know.
In any case, I don't know that the migrate plugin can really resolve that sensibly, as the site owner needs to decide which ones to drop.
I'll merge this in as is.