← Back to team overview

mahara-contributors team mailing list archive

[Bug 548181] Re: find_remote_user fails in a certain case

 

** Changed in: mahara
     Assignee: (unassigned) => Richard Mansfield (richard-mansfield)

** Changed in: mahara
    Milestone: None => 1.3.0

-- 
find_remote_user fails in a certain case
https://bugs.launchpad.net/bugs/548181
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.

Status in Mahara ePortfolio: Confirmed

Bug description:
It may be just that I'm doing something stupid (in which case should be stopped).

I have two different xmlrpc auth instances pointing at the same institution (no institution), from two different Moodles.

Moodle 1 admin user SSO's to Mahara, gets logged in as admin1

Moodle 2 admin user SSO's to Mahara, gets logged in as admin2.

So far so good.

However, find_remote_user seems to be not filtering on wwwroot, and therefore 2 remote users are found and the function fails.

I think maybe this line:

     $authinstances = auth_get_auth_instances_for_institution($institution);

needs to also filter by wwwroot.  Or the part that tries to get the user needs to:

            $user->find_by_instanceid_username($authinstance->id, $username, true);
            $candidates[$user->id] = $user;

I couldn't figure out where the wwwroot the user comes from is stored, in the case that they are in "no institution".  Is it possible that this is not stored? In which case - argh! It breaks when you have remote users from >1 xmlrpc source in the same "no institution"




This bug was imported from eduforge.org, see:
https://eduforge.org/tracker/index.php?func=detail&aid=3440&group_id=176&atid=739