Better login

This commit is contained in:
moodler
2004-09-07 08:23:11 +00:00
parent 05bd797a37
commit 003c49cb7d
+4 -1
View File
@@ -268,7 +268,10 @@
if (empty($_SESSION['USER'])) { // Allow W3CValidator in as user called w3cvalidator (or guest)
if ((strpos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') !== false) or
(strpos($_SERVER['HTTP_USER_AGENT'], 'Cynthia') !== false )) {
if (!$USER = get_user_info_from_db("username", "w3cvalidator")) {
if ($USER = get_user_info_from_db("username", "w3cvalidator")) {
$USER->loggedin = true;
$USER->site = $CFG->wwwroot;
} else {
$USER = guest_user();
}
}