]> git.mjollnir.org Git - moodle.git/commitdiff
Restore sessionIP when returning from loginas mode
authormoodler <moodler>
Mon, 29 Nov 2004 06:22:39 +0000 (06:22 +0000)
committermoodler <moodler>
Mon, 29 Nov 2004 06:22:39 +0000 (06:22 +0000)
course/loginas.php

index 373cd42700174bd07781778e5ffa9bcfa03185e3..f9d967750c0ba5afdfc0ef9fd13ffbfc076f3b1e 100644 (file)
@@ -21,6 +21,7 @@
         $USER = get_user_info_from_db("id", $USER->realuser);
         $USER->loggedin = true;
         $USER->site = $CFG->wwwroot;
+        $USER->sessionIP = md5(getremoteaddr());     // Store the current IP in the session
 
         if (isset($SESSION->oldcurrentgroup)) {      // Restore previous "current group"
             $SESSION->currentgroup[$course->id] = $SESSION->oldcurrentgroup;