diff --git a/resources/check_auth.php b/resources/check_auth.php index 038105b0b1..1bd2493fea 100644 --- a/resources/check_auth.php +++ b/resources/check_auth.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2013 + Portions created by the Initial Developer are Copyright (C) 2008-2014 the Initial Developer. All Rights Reserved. Contributor(s): @@ -307,11 +307,12 @@ require_once "resources/require.php"; foreach($_SESSION["groups"] as $field) { if (strlen($field['group_name']) > 0) { if ($x == 0) { - $sql .= "where (domain_uuid = '".$domain_uuid."' and group_name = '".$field['group_name']."') "; + $sql .= "where (domain_uuid = '".$domain_uuid."' and domain_uuid = null) "; } else { - $sql .= "or (domain_uuid = '".$domain_uuid."' and group_name = '".$field['group_name']."') "; + $sql .= "or (domain_uuid = '".$domain_uuid."' and domain_uuid = null) "; } + $sql .= "or group_name = '".$field['group_name']."' "; $x++; } }