mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #08916
[Bug 988254] [NEW] function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
Public bug reported:
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);
}
** Affects: mahara
Importance: Undecided
Status: New
** Tags: moodle usersuniquebyusername xmlrpc
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/988254
Title:
function get_file in api/xmlrpc/lib.php not respecting
usersuniquebyusername
Status in Mahara ePortfolio:
New
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
Follow ups
-
[Bug 988254] Re: function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
From: Aaron Wells, 2015-11-30
-
[Bug 988254] Re: function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
From: Azrael, 2015-11-25
-
[Bug 988254] Re: function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
From: Kristina Hoeppner, 2014-08-24
-
[Bug 988254] Re: function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
From: Robert Lyon, 2014-07-31
-
[Bug 988254] Re: function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
From: Aaron Wells, 2014-05-13
-
[Bug 988254] Re: function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
From: Robert Lyon, 2014-04-03
-
[Bug 988254] Re: function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
From: Aaron Wells, 2013-12-16
-
[Bug 988254] Re: function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
From: Aaron Wells, 2013-10-22
-
[Bug 988254] Re: function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
From: Aaron Wells, 2013-09-30
-
[Bug 988254] Re: function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
From: Aaron Wells, 2013-04-19
-
[Bug 988254] Re: function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
From: Kristina Hoeppner, 2012-09-10
-
[Bug 988254] Re: function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
From: Richard Mansfield, 2012-04-27
-
[Bug 988254] Re: function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
From: Kristina Hoeppner, 2012-04-26
-
[Bug 988254] Re: function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
From: Azrael, 2012-04-25
-
[Bug 988254] Re: function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
From: Azrael, 2012-04-25
-
[Bug 988254] [NEW] function get_file in api/xmlrpc/lib.php not respecting usersuniquebyusername
From: Azrael, 2012-04-25
References