/**
  * Returns the frontend (realtime) notification(s) to a user. The return format is JSON.
  *
  * Note:
  * At this point a Zend_Session::writeClose() is needed, to avoid blocking of other requests.
  * See http://www.php.net/manual/en/function.session-write-close.php for more details.
  *
  * @return void
  */
 public function jsonGetFrontendMessageAction()
 {
     try {
         Zend_Session::writeClose(false);
     } catch (Exception $error) {
         Phprojekt::getInstance()->getLog()->debug('Error: ' . $error->getMessage());
     }
     $notification = new Phprojekt_Notification_FrontendMessage();
     $userId = (int) Phprojekt_Auth::getUserId();
     $data = $notification->getFrontendMessage($userId);
     $return = array("data" => $data);
     Phprojekt_Converter_Json::echoConvert($return);
 }