mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #18999
[Bug 988254] Re: function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
** Changed in: mahara
Milestone: 1.8.3 => 1.9.2
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/988254
Title:
function get_file in api/xmlrpc/lib.php not respecting
usersuniquebyusername
Status in Mahara ePortfolio:
Triaged
Bug description:
When I hook my 1 Mahara installation up to 2 (or more) Moodle
installations, and try to push content from Moodle to Mahara, I
encounter an error.
Failed to start communication with remote server: remote server error: code: , message: Could not find user BLAH for https://BLAH.BLAH.ac.ukERROR 4:
4: remote server error: code: , message: Could not find user BLAH for https://BLAH.BLAH.ac.uk
This error is from xmlrpc/lib.php get_file() (line 286) which calls
find_remote_user($username, $REMOTEWWWROOT).
I am fairly sure there is a bug in xmlrpc/lib.php find_remote_user()
because if I change the authentication of a user in Mahara to be from
a specific Moodle, I can export from that Moodle but not the other,
and vice versa.
This makes sense if each user from different systems (even if they
have the same username) is treated as a different user, which is
default behaviour. However I have the config option of
usersuniquebyusername set so that users from different systems with
the same username are treated as the same user.
$cfg->usersuniquebyusername = true;
In this case I would expect Mahara NOT to try and confirm that the
source of the user is the same one listed within Mahara as their
authentication method.
My gut reaction is that the find_remote_user function in
xmlrpc/lib.php (line 125) should be checking for the CFG value of
usersuniquebyusername and if set then specifically NOT discriminate by
authentication method.
So something along the lines of the following, changing line 134
from:
$authinstances =
auth_get_auth_instances_for_institution($institution);
to:
if (get_config('usersuniquebyusername')) {
$authinstances = auth_get_auth_instances();
}
else {
$authinstances = auth_get_auth_instances_for_institution($institution);
}
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/988254/+subscriptions
References