Merge branch '2016.11-develop' into 2017.11
authorjenkins <tine20-jenkins@metaways.de>
Mon, 7 Aug 2017 11:06:38 +0000 (13:06 +0200)
committerjenkins <tine20-jenkins@metaways.de>
Mon, 7 Aug 2017 11:06:38 +0000 (13:06 +0200)
tine20/Tinebase/ActionQueue.php

index 150894a..394f491 100644 (file)
     {
         $params = func_get_args();
         $action = array_shift($params);
+        $user = Tinebase_Core::getUser();
+        if (! is_object($user)) {
+            if (Tinebase_Core::isLogLevel(Zend_Log::ERR)) Tinebase_Core::getLogger()->err(
+                __METHOD__ . '::' . __LINE__ . " Not Queueing action: '{$action}' because no valid user object found");
+            return null;
+        }
+
         $message = array(
             'action'     => $action,
-            'account_id' => Tinebase_Core::getUser()->getId(),
+            'account_id' => $user->getId(),
             'params'     => $params
         );