MDL-17773 new get_login_url() function - fixes missing httpslogin tweaks

This commit is contained in:
skodak
2009-01-02 22:56:48 +00:00
parent 27df7ae8a5
commit 93f66983cc
36 changed files with 121 additions and 117 deletions
+23
View File
@@ -95,6 +95,29 @@ class moodle_session {
session_set_user($user);
}
protected function check_security() {
global $CFG;
if (!empty($_SESSION['USER']->id)) {
/// Make sure current IP matches the one for this session (if required)
$remoteaddr = getremoteaddr();
if (empty($_SESSION['USER']->sessionip)) {
$_SESSION['USER']->sessionip = $remoteaddr;
}
if ($_SESSION['USER']->sessionip != $remoteaddr) {
if (!is_guestuser($_SESSION['USER'])) {
$link = '';
} else {
}
print_error('sessionipnomatch', 'error');
}
}
}
/**
* Terminates active moodle session
*/