summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-08-12 14:01:02 +0000
committeralecpl <alec@alec.pl>2011-08-12 14:01:02 +0000
commit59ab0c3bcd146f48940459240f980f4a97f280cd (patch)
tree849fcb2a1a134206fbe9de64ddcb0ba012c81648 /program/include
parentf4c364967153f9b1532b55e8ca82f4a6a1cad460 (diff)
- Fix infinite recurrence when saving user preferences stored in session
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_user.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/program/include/rcube_user.php b/program/include/rcube_user.php
index b4a7c8871..d2bbaa176 100644
--- a/program/include/rcube_user.php
+++ b/program/include/rcube_user.php
@@ -122,7 +122,10 @@ class rcube_user
if (!empty($_SESSION['preferences'])) {
// Check last write attempt time, try to write again (every 5 minutes)
if ($_SESSION['preferences_time'] < time() - 5 * 60) {
- $this->save_prefs(unserialize($_SESSION['preferences']));
+ $saved_prefs = unserialize($_SESSION['preferences']);
+ $this->rc->session->remove('preferences');
+ $this->rc->session->remove('preferences_time');
+ $this->save_prefs($saved_prefs);
}
else {
$this->data['preferences'] = $_SESSION['preferences'];