Merge or convert users NC 31

Hi,

We migrated to NC31 from OwnCloud. Most of our users are authenticated using LDAP. Our NC usernames are generated with the LDAP displayName attribute. The issue that we are facing is that some f the displayName values were modified by users. The result is that in the migrated NC31 instance I have now users that vary a little (for example one is John_Doe_Mr and the new one is John_Doe). John Doe_Mr has the user’s files that come from OC but when he logs in using LDAP he’ll see the files on John_Doe. I need the files from John_Doe_Mr to appear for user John_Doe. What would be the easiest approach. I would do the following:

Copy the files (rsync maybe) from /data/John_Doe_Mr to /data/John_Doe and run occ files:scan John_Doe

Any other ideas?

If I get it right you end up with 2 different users? If this is the case the you can transfer the files and other items like contacts and calendar from one user to another using occ files:transfer-ownership or the ownershiptransfer app. transfer-ownership
If you have one user and orphan files stored in the old user name structure you should follow the move and occ files:scan procedure.