From 92a4e2a80231bc3dcdbe43410d473619426cbafa Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Tue, 3 Feb 2015 17:15:22 -0600
Subject: [PATCH] oops: Fix possible crash if user is not associated with a
 TicketUser

---
 include/class.client.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/class.client.php b/include/class.client.php
index d65b0eea7..570af7c14 100644
--- a/include/class.client.php
+++ b/include/class.client.php
@@ -51,8 +51,8 @@ implements EmailContact {
 
     }
 
-    function getId() { return $this->user->getId(); }
-    function getEmail() { return $this->user->getEmail(); }
+    function getId() { return ($this->user) ? $this->user->getId() : null; }
+    function getEmail() { return ($this->user) ? $this->user->getEmail() : null; }
 
     function sendAccessLink() {
         global $ost;
-- 
GitLab