Fix for googlebot detection ($USER was never empty)

This commit is contained in:
moodler
2006-11-06 17:53:50 +00:00
parent ef02670d09
commit c0db85f0b2
+1 -1
View File
@@ -560,7 +560,7 @@ $CFG->os = PHP_OS;
moodle_setlocale();
if (!empty($CFG->opentogoogle)) {
if (empty($_SESSION['USER'])) { // Ignore anyone logged in
if (empty($USER->id)) { // Ignore anyone logged in
if (!empty($_SERVER['HTTP_USER_AGENT'])) {
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Googlebot') !== false ) {
$USER = guest_user();