@ -207,10 +209,11 @@ function generate_list($querySQL,$list_value,$list_text, $form_name, $default_va
function list_CurrentShopUsers($form_name = "none", $default_value = "", $max_name_length = 20){
function list_CurrentShopUsers($form_name = "none", $default_value = "", $max_name_length = 20){
$current_shop = current_shop_by_ip();
$current_shop = current_shop_by_ip();
$querySQL = "SELECT full_name, shop_hours.contact_id ,hidden FROM shop_hours
$querySQL = "SELECT DISTINCT full_name, shop_hours.contact_id ,hidden FROM shop_hours
LEFT JOIN (SELECT LEFT(CONCAT(last_name, ', ', first_name, ' ',middle_initial),$max_name_length) AS full_name, contact_id, hidden FROM contacts) as contacts ON shop_hours.contact_id=contacts.contact_id
LEFT JOIN (SELECT LEFT(CONCAT(last_name, ', ', first_name, ' ',middle_initial),$max_name_length)
WHERE shop_hours.shop_id = $current_shop
AS full_name, contact_id, hidden FROM contacts) as contacts ON shop_hours.contact_id=contacts.contact_id