]> git.mjollnir.org Git - moodle.git/commitdiff
mnet: MDL-21298 fixed a very unhelpful error message (and saved a db query)
authorPenny Leach <penny@liip.ch>
Mon, 11 Jan 2010 22:20:11 +0000 (22:20 +0000)
committerPenny Leach <penny@liip.ch>
Mon, 11 Jan 2010 22:20:11 +0000 (22:20 +0000)
this just modifies the nolocaluser string, rather than adding nolocaluser2 like I did in stable.

Merged from MOODLE_19_STABLE

auth/mnet/auth.php
lang/en_utf8/mnet.php

index ab077213b4fec89ea3864c1a3204631dd6f07a7b..84240166a6344b0e5551715af184e7a0dcf8d4eb 100644 (file)
@@ -296,11 +296,9 @@ class auth_plugin_mnet extends auth_plugin_base {
             }
             $remoteuser->mnethostid = $remotehost->id;
             $remoteuser->firstaccess = time(); // First time user in this server, grab it here
-            $DB->insert_record('user', $remoteuser);
+            $remoteuser->id = $DB->insert_record('user', $remoteuser);
             $firsttime = true;
-            if (! $localuser = $DB->get_record('user', array('username'=>$remoteuser->username, 'mnethostid'=>$remotehost->id))) {
-                print_error('nolocaluser', 'mnet');
-            }
+            $localuser = $remoteuser;
         }
 
         // check sso access control list for permission first
index 4fb35a5f81a3dfb97a4622cb2f6cf335d3e5479f..b1824dc1b83e139efd172afc6bd3d3013c3308f9 100644 (file)
@@ -216,7 +216,7 @@ $string['authfail_usermismatch'] = 'Authorisation failed: the user does not matc
 $string['hostnotconfiguredforsso'] = 'This remote Moodle Hub is not configured for remote login.';
 $string['authmnetdisabled'] = 'Moodle Networking authentication is disabled.';
 $string['unknownerror'] = 'Unknown error occurred during negotiation.';
-$string['nolocaluser'] = 'No local record exists for remote user.';
+$string['nolocaluser'] = 'No local record exists for remote user, and it could not be created, as this host will not auto create users.  Please contact your administrator!';
 $string['databaseerror'] = 'Could not write details to the database.';
 $string['ssoacldescr'] = 'Use this page to grant/deny access to specific users from remote Moodle Network hosts. This is functional when you are offering SSO services to remote users. To control your <em>local</em> users\' ability to roam to other Moodle Network hosts, use the roles system to grant them the <em>mnetlogintoremote</em> capability.';
 $string['ssoaclneeds'] = 'For this functionality to work, you must have Moodle Networking On, plus the Moodle Network authentication plugin enabled with auto-add users enabled .';