Added cookie detection, based on Petr's code. Thanks!

A notice will be printed on the login page if the session cookie can not be set.
This commit is contained in:
moodler 2005-01-11 12:43:29 +00:00
parent 420158ba41
commit 792197b095
3 changed files with 23 additions and 3 deletions

View file

@ -43,7 +43,12 @@ class block_login extends block_base {
$signup = '';
}
$username = get_moodle_cookie();
if (get_moodle_cookie() == '') {
set_moodle_cookie('nobody'); // To help search for cookies
}
$username = get_moodle_cookie() === 'nobody' ? '' : get_moodle_cookie();
if (empty($USER->loggedin)) {
$this->content->text = "<form name=\"blocklogin\" method=\"post\"";
$this->content->text .= " action=\"". $wwwroot ."/login/index.php\">\n";