]> git.mjollnir.org Git - moodle.git/commitdiff
Test for empty dataset to suppress a warning
authordonal72 <donal72>
Thu, 1 Nov 2007 06:11:08 +0000 (06:11 +0000)
committerdonal72 <donal72>
Thu, 1 Nov 2007 06:11:08 +0000 (06:11 +0000)
auth/mnet/auth.php

index fbb5a981afc007651ff6bdcfdf49ac9d2a425c0c..b7f98118ecb8d6425cbb1a174a0cf4999b88b72d 100644 (file)
@@ -289,7 +289,7 @@ class auth_plugin_mnet extends auth_plugin_base {
 
         // add the remote user to the database if necessary, and if allowed
         // TODO: refactor into a separate function
-        if (! $localuser->id) {
+        if (empty($localuser) || ! $localuser->id) {
             if (empty($this->config->auto_add_remote_users)) {
                 error(get_string('nolocaluser', 'mnet'));
             }