From 5a07b1ad8268dc244a354bfd99b6de462b737e97 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Thu, 16 Apr 2015 12:58:47 -0500
Subject: [PATCH] advanced-search: Hide "Me" from the assigned to agent listing

Fixes #1854
---
 include/staff/tickets.inc.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/staff/tickets.inc.php b/include/staff/tickets.inc.php
index 82caa6727..6fa756e21 100644
--- a/include/staff/tickets.inc.php
+++ b/include/staff/tickets.inc.php
@@ -602,8 +602,10 @@ if ($results) {
                 <option value="s<?php echo $thisstaff->getId(); ?>"><?php echo __('Me');?></option>
                 <?php
                 if(($users=Staff::getStaffMembers())) {
-                    echo '<OPTGROUP label="'.sprintf(__('Agents (%d)'),count($users)).'">';
+                    echo '<OPTGROUP label="'.sprintf(__('Agents (%d)'),count($users)-1).'">';
                     foreach($users as $id => $name) {
+                        if ($id == $thisstaff->getId())
+                            continue;
                         $k="s$id";
                         echo sprintf('<option value="%s">%s</option>', $k, $name);
                     }
-- 
GitLab