MDL-17772 fixed guest access; MDL-17754 $USER object initialisation cleanup

This commit is contained in:
skodak
2009-01-02 21:05:16 +00:00
parent b7b64ff2e0
commit 1b813f5c2a
8 changed files with 22 additions and 21 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ class moodle_session {
$user = guest_user();
}
}
if (!$user and !empty($_SERVER['HTTP_REFERER'])) {
if (!empty($CFG->guestloginbutton) and !$user and !empty($_SERVER['HTTP_REFERER'])) {
// automaticaly log in users coming from search engine results
if (strpos($_SERVER['HTTP_REFERER'], 'google') !== false ) {
$user = guest_user();