diff --git a/include/class.client.php b/include/class.client.php
index 7464b841ca8ab7bfb5217d2965760ea99ff28fb9..b5d062c95708e8a715dd8a5bc6a3614031f66e14 100644
--- a/include/class.client.php
+++ b/include/class.client.php
@@ -27,6 +27,7 @@ class Client {
     var $_answers;
 
     var $ticket_id;
+    var $user_id;
     var $ticketID;
 
     var $ht;
@@ -42,7 +43,7 @@ class Client {
         if(!$id && !($id=$this->getId()))
             return false;
 
-        $sql='SELECT ticket.ticket_id, ticketID, email.address as email '
+        $sql='SELECT ticket.ticket_id, ticketID, email.address as email, user.id as user_id '
             .' FROM '.TICKET_TABLE.' ticket '
             .' LEFT JOIN '.USER_TABLE.' user ON user.id = ticket.user_id'
             .' LEFT JOIN '.USER_EMAIL_TABLE.' email ON user.id = email.user_id'
@@ -59,7 +60,8 @@ class Client {
         $this->ticket_id  = $this->ht['ticket_id'];
         $this->ticketID   = $this->ht['ticketID'];
 
-        $user = User::lookup(array('emails__address'=>$this->ht['email']));
+        $user = User::lookup($this->ht['user_id']);
+        $this->user_id    = $this->ht['user_id'];
         $this->fullname   = $user->getFullName();
 
         $this->username   = $this->ht['email'];
@@ -90,6 +92,10 @@ class Client {
         return $this->id;
     }
 
+    function getUserId() {
+        return $this->user_id;
+    }
+
     function getEmail() {
         return $this->email;
     }
diff --git a/open.php b/open.php
index 706c9ccd4a31e6febee613c9416acfc19988ef36..a731e2132465e29d0014ae78341d18fd0614408d 100644
--- a/open.php
+++ b/open.php
@@ -21,8 +21,7 @@ if($_POST):
     $vars = $_POST;
     $vars['deptId']=$vars['emailId']=0; //Just Making sure we don't accept crap...only topicId is expected.
     if($thisclient) {
-        $vars['name']=$thisclient->getName();
-        $vars['email']=$thisclient->getEmail();
+        $vars['uid'] = $thisclient->getUserId();
     } elseif($cfg->isCaptchaEnabled()) {
         if(!$_POST['captcha'])
             $errors['captcha']='Enter text shown on the image';