Commit 0672f2fa authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Create remote user records if a user signs in using a parent auth method (bug 3190)

parent 07b40aee
......@@ -1195,7 +1195,10 @@ function login_submit(Pieform $form, $values) {
$USER->email = null;
}
try {
create_user($USER, array(), $institution);
// If this authinstance is a parent auth for some xmlrpc authinstance, pass it along to create_user
// so that this username also gets recorded as the username for sso from the remote sites.
$remoteauth = count_records('auth_instance_config', 'field', 'parent', 'value', $authinstance->id) ? $authinstance : null;
create_user($USER, array(), $institution, $remoteauth);
$USER->reanimate($USER->id, $authinstance->id);
}
catch (Exception $e) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment