From e30cef14467b02a601f7724f5e6de2df83d0f634 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Thu, 20 Sep 2007 07:03:20 +0200 Subject: [PATCH] [svn r13117] Added auth_source to initial user info (collected on login) into $_user[] Added more checks on the existence of the files that are later iincluded regarding authentication methods --- main/inc/local.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main/inc/local.inc.php b/main/inc/local.inc.php index 4a17428e9e..e8516b86c1 100644 --- a/main/inc/local.inc.php +++ b/main/inc/local.inc.php @@ -277,7 +277,7 @@ else //do nothing (code may be added later) } } - elseif(!empty($extAuthSource[$uData['auth_source']]['login'])) + elseif(!empty($extAuthSource[$uData['auth_source']]['login']) && file_exists($extAuthSource[$uData['auth_source']]['login'])) { /* * Process external authentication @@ -333,7 +333,10 @@ else { foreach($extAuthSource as $thisAuthSource) { - include_once($thisAuthSource['newUser']); + if(!empty($thisAuthSource['newUser']) && file_exists($thisAuthSource['newUser'])) + { + include_once($thisAuthSource['newUser']); + } } } //end if is_array($extAuthSource) @@ -426,6 +429,7 @@ $admin_table = Database::get_main_table(TABLE_MAIN_ADMIN); $_user ['picture_uri'] = $uData ['picture_uri']; $_user ['user_id'] = $uData ['user_id']; $_user ['language'] = $uData ['language']; + $_user ['auth_source'] = $uData ['auth_source']; $is_platformAdmin = (bool) (! is_null( $uData['is_admin'])); $is_allowedCreateCourse = (bool) ($uData ['status'] == 1);