I think that once you have verified the authentication parameters, you just need to do something like:
// log in
$USER = get_complete_user_data('id', $localuser->id, $localuser->mnethostid);
(around line 34 in /auth/mnet/land.php) get_complete_user_data can look up users using different fields, and you'll probably want to skip the last parameter.
/auth/mnet/land.php is the file that you get redirected to when you want to log into a remote Moodle using Moodle Networks, and it causes the user to be logged in automatically.
Security and privacy
Integration with external system users?
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.