]> git.mjollnir.org Git - moodle.git/commitdiff
Make sure the new admin user has the sessionIP set properly the first time
authormoodler <moodler>
Fri, 8 Oct 2004 13:16:34 +0000 (13:16 +0000)
committermoodler <moodler>
Fri, 8 Oct 2004 13:16:34 +0000 (13:16 +0000)
admin/user.php

index 4af033c8bea98fa33fa73f09de284c2803035f7b..9f7465d608fe1ee1b463c82df310e62dcde65239 100644 (file)
@@ -58,6 +58,7 @@
         $USER = $user;
         $USER->loggedin = true;
         $USER->sesskey  = random_string(10); // for added security, used to check script parameters
+        $user->sessionIP = md5(getremoteaddr());   // Store the current IP in the session
         $USER->site = $CFG->wwwroot;
         $USER->admin = true;
         $USER->teacher["$site->id"] = true;