From 85e60ada1558798669b29225aa530b4ba9310cdc Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Sun, 10 Nov 2013 08:04:33 -0500
Subject: [PATCH] First version of the local storage compose data saving feature; some behavioral improvements and encrytion are still to be added

---
 program/lib/Roundcube/rcube_user.php |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/program/lib/Roundcube/rcube_user.php b/program/lib/Roundcube/rcube_user.php
index 57f6336..3e4be0a 100644
--- a/program/lib/Roundcube/rcube_user.php
+++ b/program/lib/Roundcube/rcube_user.php
@@ -221,6 +221,14 @@
         return false;
     }
 
+    /**
+     * Generate a unique hash to identify this user which
+     */
+    function get_hash()
+    {
+        $key = substr($this->rc->config->get('des_key'), 1, 4);
+        return md5($this->data['user_id'] . $key . $this->data['username'] . '@' . $this->data['mail_host']);
+    }
 
     /**
      * Get default identity of this user

--
Gitblit v1.9.1