diff --git a/inc/auth.php b/inc/auth.php
index 8965ee4c019cb2236799e44c76ab5953061cf12f..10d55980ddec655ed1cfd0b26f82f541498fb97d 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -1049,12 +1049,19 @@ function updateprofile() {
         return false;
     }
 
-    // update cookie and session with the changed data
     if($changes['pass']) {
+        // update cookie and session with the changed data
         list( /*user*/, $sticky, /*pass*/) = auth_getCookie();
         $pass = auth_encrypt($changes['pass'], auth_cookiesalt(!$sticky, true));
         auth_setCookie($INPUT->server->str('REMOTE_USER'), $pass, (bool) $sticky);
+    } else {
+        // make sure the session is writable
+        @session_start();
+        // invalidate session cache
+        $_SESSION[DOKU_COOKIE]['auth']['time'] = 0;
+        session_write_close();
     }
+
     return true;
 }