There is almost certainly something wrong with this stuff, but it
confuses me.  I *think* the authinstance column on the auth_remote_user
table is probably redundant, and that we should rely on the authinstance
column in the usr table at all times.

Whenever a user gets created, we try to store the parent authinstance in
the usr table *and* in auth_remote_usr if possible.  The only
complication is that a parent auth method can be added after the user
gets created for the first time, so you end up with some users who have
the parent method stored, and other users with the child method stored.
As far as I can tell, the user's authinstance never gets updated during
login in either table.  The only time it changes is by the admin
changing it deliberately on the admin 'edit account settings' page, and
when the user gets removed from an institution that owns their
authinstance.

I guess the use case for sometimes storing the parent and sometimes the
child is when some users might be able to log in to Mahara from multiple
moodles in the same institution (parent authinstance is stored) and
other users can only log in from one moodle (child auth stored).

Will do some more digging and confirm that we can ignore the
authinstance column of auth_remote_user.  If we can then obviously it'll
require rewriting a few queries.

-- 
Cannot log in or modify user when auth_remote_user has duplicate username 
entries
https://bugs.launchpad.net/bugs/547565
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.

Status in Mahara ePortfolio: Triaged

Bug description:
If there are duplicate entries in auth_remote_user for the same username login 
(and modifying the user record) fails. The code clearly expects the username to 
be unique and errors ensue.

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



_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to