From 32d651c853a7d70514789172e7956966333a77b5 Mon Sep 17 00:00:00 2001 From: donal72 Date: Thu, 1 Nov 2007 06:11:08 +0000 Subject: [PATCH] Test for empty dataset to suppress a warning --- auth/mnet/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/mnet/auth.php b/auth/mnet/auth.php index fbb5a981afc..b7f98118ecb 100644 --- a/auth/mnet/auth.php +++ b/auth/mnet/auth.php @@ -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')); }