User names Across Servers

User names Across Servers

by Bryan Smith -
Number of replies: 3
If I connect Moodle Server A to Server B and have two users each with a user with the same exact user name (example jdoe), how does moodle resolve those when roaming to different servers using MNet?
Average of ratings: -
In reply to Bryan Smith

Re: User names Across Servers

by Hubert Chathi -
Server A and Server B each have an entry in the remote Moodle's mdl_mnet_host table. The remote Moodle stores the id of the originating host for each user in the mdl_user table, so that each user record is associated with the correct originating server.
In reply to Hubert Chathi

Re: User names Across Servers

by Bryan Smith -
so there shouldn't be any problems if I have two identical user names on two servers then. correct?
In reply to Bryan Smith

Re: User names Across Servers

by Hubert Chathi -
correct. (Unless you have some code on your site (plugins, etc.) that only looks at the username, and not the originating host ID, but that kind of code should be very rare, since most code should be using the user id, and not the username.)