Replace local users with mnet users

Re: Replace local users with mnet users

by David Bogner -
Number of replies: 0
Picture of Core developers Picture of Plugin developers

Hi Vernon,


thank you for reminding me to feedback the outcome of the tests. In fact, if you have a no identical users on the two platforms to merge, the workflof described by David works perfectly.

We did tests and replacing the mnetuserid with the host changes the user to a remote user.

I thought this could be done with csv files. But uploading a csv file with mnethostid is not supported. So you have to do this step with a SQL-query that looks similar to this one

UPDATE mdl_user
SET auth='mnet', mnethostid=mnethostidgoeshere
WHERE msn='changetomnet'

(You have to be careful in this step: Do not change admins mnethostid!!) We marked all users that are to be changed to remote users in the msn field with "changetomnet". None of our users used the msn profile field, so for reasons of simplicity we decided to use the msn profile field (we downloaded all users as csv, then uploaded a csv file with the msn field set to "changetomnet" for users that should be mnet users), if your users use msn profile field, then do not do this, you could setup a custom user profile field, but the SQL query would be more complicated.


We have a more complexe situation because, the platforms we are merging have also identical users (some users are identical on A and B and C). So we find out first who are identical,...

For any further questions just contact me again.


Best regards,

David

Average of ratings: Useful (2)