plugins/libkolab

Thomas Brüderli bruederli at kolabsys.com
Wed Feb 20 21:17:31 CET 2013


 plugins/libkolab/lib/kolab_storage_folder.php |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 38e622023ab8e0689c5f17107a81a1a825cb9cad
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Wed Feb 20 21:03:44 2013 +0100

    Use generic getter for current user's email; also works in framework without session and user database record

diff --git a/plugins/libkolab/lib/kolab_storage_folder.php b/plugins/libkolab/lib/kolab_storage_folder.php
index a671faf..5038a64 100644
--- a/plugins/libkolab/lib/kolab_storage_folder.php
+++ b/plugins/libkolab/lib/kolab_storage_folder.php
@@ -775,9 +775,9 @@ class kolab_storage_folder
         $part_id  = 1;
         $encoding = $binary ? 'binary' : 'base64';
 
-        if ($ident = $rcmail->user->get_identity()) {
-            $headers['From'] = $ident['email'];
-            $headers['To'] = $ident['email'];
+        if ($user_email = $rcmail->get_user_email()) {
+            $headers['From'] = $user_email;
+            $headers['To'] = $user_email;
         }
         $headers['Date'] = date('r');
         $headers['X-Kolab-Type'] = kolab_format::KTYPE_PREFIX . $type;
@@ -819,7 +819,7 @@ class kolab_storage_folder
             false,                  // is_file
             '8bit',                 // encoding
             'attachment',           // disposition
-            RCUBE_CHARSET          // charset
+            RCUBE_CHARSET           // charset
         );
         $part_id++;
 





More information about the commits mailing list