In phpbb3 I have the administrator called "theadmin" for example instead of the default "admin", in drupal I have it called admin.
The phpbb admin user "theadmin" had posts in phpbb3.
If i migrate when admin names are different, its posts are imported under "deleted user #2 random 804" and not to drupal admin.
Looking at d7 user table, I can see it makes a new user and calls it "deleted user #2 random 804" importing the posts to this user.
I bet it takes #2 on the name from user id in phpbb3, admin id in phpbb3 table is #2.
User 1 is the guest user in phpbb3.
Is this normal?
- Shouldn't it check if phpbb user is admin and, if positive, import them to the equivalent drupal admin, even if names are different?
If I change drupal admin name to the same as phpbb3, the posts are imported correctly to drupal admin and all works fine.
Comments
Comment #1
JeremyFrench commentedJust out of interest. Do you have a different email for both?
This is to do with the duplicate handling. it isn't behaving quite as defined.
It should:
If email address matches count users a the same. continue to use the existing Drupal user nam
If there is a user name collision, rename the incoming user.
The deleted user name should only be used when content is migrated where there is no user in phpbb
I am pretty sure case 1 and 3 work, not so sure about 2. I'll have a dig tomorrow.
Comment #2
challenge commentedoh yes, admins have different email address.
It could be that I inserted same email too when I changed drupal's name to same name as the phpbb's one, so that's why it was working!
Should admin user be an exception to the email control?
I mean if admin uses a different email, all the posts from admin (imagine forum rules, announces and things like those) would not be copied. Big "issue".
If the email thing is normal even for admin user and they should be the same, please write this on docs because I think a lot of people then will have this issue :D
now I'm trying to dig more details/more clearly, trying to import with some combinations: same email/same name, same email/different name etc. to see if working as expected.
Comment #3
challenge commentedre-tried the migration from clean db paying more attention, it seems to me is not working as it should.
- I set drupal admin to same name /same email address of phpbb3's one(i checked the email on phpbb database to be 100% sure):
drupal user remains admin, "deleted user #2 random 898" get created and all posts go to this "deleted user #2", the user is blocked and no admin privileges.
I import in order as they are in the module: avatar, forum, users and all it's fine and no strange user get created.
"deleted user #2" is created when importing topics.
I could swear I saw the posts assigned to drupal admin, but maybe it was with a precedent release of your module. (I tried a lot of versions today and this could have me confused)
Comment #4
JeremyFrench commentedHave just realized that user 2 is left out of the migration. However in some cases this user is used on the site. I don't see harm in including it. So I will change that soon (once I have a couple of attachment issues fixed).
Comment #5
challenge commentedYou know, user 2 is the admin on phpbb3.
The "non written rule" says admin account shouldn't be used as a regular user for security issues on some software platforms, but the reality is that a lot of forums use it for posting too.
It's usually used to post site announcements, site news, rules of the forum/subforum etc..
In that case (my case too), it has posts that must be migrated and they should be assigned to the correspondent drupal admin.
Comment #6
JeremyFrench commentedI am working on migrating as a standard user for the moment. Are you saying that it should be mapped to the admin user in all cases?
Comment #7
challenge commenteduid#2 is ALWAYS admin on phpbb3 database, it's built that way.
For me it should be like this
- phpbb3 user id2 should always be mapped to drupal admin only IF email is the same, even if names are different.
--If phphbb email is different from drupal admin email, import it as standard user and keep its phpbb name, if names are the same(but different email) then add a string to the original name (like admin-old)
all this only for phpbb user 2 , the other users are ok as now.
If you think this is a bad way, let's talk.
Comment #8
JeremyFrench commentedI think this is doing what you would like now. However it messes up the batch having user 1 be saved while running an import. See how it works for you.
Comment #9
challenge commentedI'll try this and the other commits i see on git (media, post dates etc) later this night.
Comment #10
challenge commentedAs now I tried latest git with same admin name and same email between phpbb and drupal and it migrated the posts correctly as I wanted.
should try with different names but same email to see what it does.
Comment #11
JeremyFrench commentedHi There.
This is now slightly different you will have to go to the new advanced settings section in the migrate setup screen and select import as admin for the admin user. It should work as you want, but now there are options for people who need it to work differently.
Comment #12
challenge commentedVery cool. I saw the advanced settings, I tried some settings and it seems working fine.