User Edit: Query fixes.

This commit is contained in:
Nate Jones 2015-05-09 21:54:33 +00:00
parent 8ca8d32950
commit 55d41f3699
1 changed files with 5 additions and 6 deletions

View File

@ -523,12 +523,12 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") {
echo $field['group_name'].(($field['group_domain_uuid'] != '') ? "@".$_SESSION['domains'][$field['group_domain_uuid']]['domain_name'] : null);
echo " </td>\n";
if ($result_count > 1) {
echo " <td class='list_control_icons' style='width: 25px;'>\n";
if (permission_exists('group_member_delete') || if_group("superadmin")) {
echo " <td class='list_control_icons' style='width: 25px;'>\n";
echo " <a href='usersupdate.php?id=".$user_uuid."&domain_uuid=".$domain_uuid."&group_uuid=".$field['group_uuid']."&a=delete' alt='".$text['button-delete']."' onclick=\"return confirm('".$text['confirm-delete']."')\">$v_link_label_delete</a>\n";
}
echo " </td>\n";
}
}
echo "</tr>\n";
$assigned_groups[] = $field['group_uuid'];
}
@ -538,8 +538,7 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") {
unset($sql, $prep_statement, $result, $result_count);
$sql = "select * from v_groups ";
$sql .= "where domain_uuid = '".$domain_uuid."' ";
$sql .= "or domain_uuid is null ";
$sql .= "where (domain_uuid = '".$domain_uuid."' or domain_uuid is null) ";
if (sizeof($assigned_groups) > 0) {
$sql .= "and group_uuid not in ('".implode("','",$assigned_groups)."') ";
}