From 2821e9bd53d3a2a418e725a23319514385d51653 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 26902e61f..a55d7bf32 100644 --- a/include/class.client.php +++ b/include/class.client.php @@ -55,8 +55,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