瀏覽代碼

Update users.php

FusionPBX 6 年之前
父節點
當前提交
4a2a12c969
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      core/users/users.php

+ 5 - 4
core/users/users.php

@@ -55,7 +55,7 @@
 //get the list of superadmins
 	$superadmins = superadmin_list($db);
 
-//get the users' group(s) from the database
+//get the user group(s) from the database
 	$sql = "select ";
 	$sql .= "	gu.*, g.domain_uuid as group_domain_uuid ";
 	$sql .= "from ";
@@ -83,7 +83,7 @@
 	}
 	unset ($sql, $prep_statement);
 
-//get total user count from the database
+//get the user count from the database
 	$sql = "select count(*) as num_rows from v_users where 1 = 1 ";
 	if (!(permission_exists('user_all') && $_GET['show'] == 'all')) {
 		$sql .= "and domain_uuid = '".$_SESSION['domain_uuid']."' ";
@@ -124,8 +124,9 @@
 	list($paging_controls, $rows_per_page, $var_3) = paging($num_rows, $param, $rows_per_page);
 	$offset = $rows_per_page * $page;
 
-	$sql = "select * from v_users as u, v_contacts as c ";
-	$sql .= "where u.contact_uuid = c.contact_uuid ";
+	$sql = "select * from v_contacts as c ";
+	$sql .= "right join v_users u on u.contact_uuid = c.contact_uuid ";
+	$sql .= "where 1 = 1 ";
 	if (!(permission_exists('user_all') && $_GET['show'] == 'all')) {
 		$sql .= "and u.domain_uuid = '".$_SESSION['domain_uuid']."' ";
 	}