? 19-session-regen.patch
? MDL-17931-v2.patch
? MDL-17931.patch
? mdl-17629-1.9.patch
? silent.patch
? unmergedfiles.txt
? question/type/flashdd
Index: auth/mnet/auth.php
===================================================================
RCS file: /cvsroot/moodle/moodle/auth/mnet/auth.php,v
retrieving revision 1.27.2.19
diff -u -r1.27.2.19 auth.php
--- auth/mnet/auth.php	11 Jan 2010 22:20:14 -0000	1.27.2.19
+++ auth/mnet/auth.php	1 Feb 2010 02:20:46 -0000
@@ -231,6 +231,17 @@
     }
 
     /**
+     * after a successful login, land.php will call complete_user_login
+     * which will in turn regenerate the session id.
+     * this means that what is stored in mnet_session table needs updating.
+     *
+     */
+    function update_session_id() {
+        global $USER;
+        return set_field('mnet_session', 'session_id', session_id(), 'username', $USER->username, 'mnethostid', $USER->mnethostid, 'useragent', sha1($_SERVER['HTTP_USER_AGENT']));
+    }
+
+    /**
      * This function confirms the remote (ID provider) host's mnet session
      * by communicating the token and UA over the XMLRPC transport layer, and
      * returns the local user record on success.
Index: auth/mnet/land.php
===================================================================
RCS file: /cvsroot/moodle/moodle/auth/mnet/land.php,v
retrieving revision 1.5.2.1
diff -u -r1.5.2.1 land.php
--- auth/mnet/land.php	14 Nov 2007 23:35:00 -0000	1.5.2.1
+++ auth/mnet/land.php	1 Feb 2010 02:20:46 -0000
@@ -34,6 +34,7 @@
 // log in
 $USER = get_complete_user_data('id', $localuser->id, $localuser->mnethostid);
 complete_user_login($USER);
+$mnetauth->update_session_id();
 
 if (!empty($localuser->mnet_foreign_host_array)) {
     $USER->mnet_foreign_host_array = $localuser->mnet_foreign_host_array;
