? _login.patch
? _login2.patch
? files
? latest.html
? modules/devel
? modules/game
? modules/htmltidy
? sites/feast-or-fa.mine.nu.drupal
Index: modules/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user.module,v
retrieving revision 1.632
diff -u -p -r1.632 user.module
--- modules/user.module	23 Jun 2006 07:06:17 -0000	1.632
+++ modules/user.module	27 Jun 2006 11:15:33 -0000
@@ -876,9 +876,10 @@ function user_auth_help_links() {
 function user_login($msg = '') {
   global $user, $base_url;
 
-  // If we are already logged on, go to the user page instead.
+  // If we are already logged on, go to the user
+  // page instead. The added seed prevents caching.
   if ($user->uid) {
-    drupal_goto('user/'. $user->uid);
+    drupal_goto('user/'. $user->uid, 'seed='.time());
   }
 
   // Display login form:
@@ -951,6 +952,9 @@ function user_login_submit($form_id, $fo
     session_regenerate_id();
     db_query("UPDATE {sessions} SET sid = '%s' WHERE sid = '%s'", session_id(), $old_session_id);
 
+    // create a timestamped final URL so that browsers don't return the user to
+    // a cached page (where it would appear as if they never logged in or out).
+    return array($_REQUEST['destination'], 'seed='.time());
   }
 }
 
@@ -1017,7 +1021,8 @@ function user_logout() {
   // We have to use $GLOBALS to unset a global variable:
   $user = user_load(array('uid' => 0));
 
-  drupal_goto();
+  // The seed prevents caching.
+  drupal_goto(NULL, 'seed='.time());
 }
 
 function user_pass() {
@@ -1157,9 +1162,10 @@ function user_register() {
 
   $admin = user_access('administer users');
 
-  // If we aren't admin but already logged on, go to the user page instead.
+  // If we aren't admin but already logged on, go to the
+  // user page instead. The added seed prevents caching.
   if (!$admin && $user->uid) {
-    drupal_goto('user/'. $user->uid);
+    drupal_goto('user/'. $user->uid, 'seed='.time());
   }
 
   // Display the registration form.
