From 068cdffd116a46aba05271be7f7fa7bf3fd2d93a Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Mon, 7 Nov 2005 00:55:10 +0000 Subject: [PATCH] user/edit: Better error handling when loading auth libs. Check with empty() to avoid casting the string to int, and provide useful info in the debug log. Merged from MOODLE_15_STABLE --- user/edit.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/user/edit.php b/user/edit.php index 9beb46ac342..53a8429a73a 100644 --- a/user/edit.php +++ b/user/edit.php @@ -57,9 +57,10 @@ // load the relevant auth libraries - if ($user->auth) { + if (!empty($user->auth)) { $auth = $user->auth; if (!file_exists("$CFG->dirroot/auth/$auth/lib.php")) { + trigger_error("Can't find auth module $auth , default to internal."); $auth = "manual"; // Can't find auth module, default to internal } require_once("$CFG->dirroot/auth/$auth/lib.php");