diff --git a/include/class.client.php b/include/class.client.php
index 23b64d161fb1772cbd788e1cd194b683f04989c2..932a5bde686bea6071c23d413368c39dc1fde5b7 100644
--- a/include/class.client.php
+++ b/include/class.client.php
@@ -36,25 +36,7 @@ implements EmailContact, ITicketUser, TemplateVariable {
                 ? call_user_func_array(array($this->user, $name), $args)
                 : call_user_func(array($this->user, $name));
 
-        if ($rv) return $rv;
-
-        $tag =  substr($name, 3);
-        switch (strtolower($tag)) {
-            case 'ticket_link':
-                $qstr = array();
-                if ($cfg && $cfg->isAuthTokenEnabled()
-                        && ($ticket=$this->getTicket()))
-                    $qstr['auth'] = $ticket->getAuthToken($this);
-
-                return sprintf('%s/view.php?%s',
-                        $cfg->getBaseUrl(),
-                        Http::build_query($qstr, false)
-                        );
-                break;
-        }
-
-        return false;
-
+        return $rv ?: false;
     }
 
     // Required for Internationalization::getCurrentLanguage() in templates
@@ -70,6 +52,22 @@ implements EmailContact, ITicketUser, TemplateVariable {
         );
     }
 
+    function getVar($tag) {
+        switch (strtolower($tag)) {
+        case 'ticket_link':
+            $qstr = array();
+            if ($cfg && $cfg->isAuthTokenEnabled()
+                    && ($ticket=$this->getTicket()))
+                $qstr['auth'] = $ticket->getAuthToken($this);
+
+            return sprintf('%s/view.php?%s',
+                    $cfg->getBaseUrl(),
+                    Http::build_query($qstr, false)
+                    );
+            break;
+        }
+    }
+
     function getId() { return ($this->user) ? $this->user->getId() : null; }
     function getEmail() { return ($this->user) ? $this->user->getEmail() : null; }