Alan Lam 6 лет назад
Родитель
Сommit
b04d099aae
1 измененных файлов с 3 добавлено и 4 удалено
  1. 3 4
      controllers/users.php

+ 3 - 4
controllers/users.php

@@ -25,11 +25,11 @@ $customer_id = http::value("customer_id", "int");
 $location_id = http::value("location_id", "int");
 
 $nvp = [];
-if($id !== false) $nvp["id"] = $id;
+if($id !== null) $nvp["id"] = $id;
 if(strlen($first_name) > 0) $nvp["first_name"] = ((new Constraint("CONTAINS"))->setValues($first_name));
 if(strlen($last_name) > 0) $nvp["last_name"] = ((new Constraint("CONTAINS"))->setValues($last_name));
 if(strlen($email) > 0) $nvp["email"] = $email;
-if($level !== false) $nvp["level"] = $level;
+if($level !== null) $nvp["level"] = $level;
 
 $filter_count = "";
 if($nvp) $filter_count = count(array_keys($nvp));
@@ -49,7 +49,6 @@ switch($sort) {
 		break;
 }
 
-
 $users = User::query($nvp, $query_options);
 
 $pagination_object = Util::getPaginationObject($users);
@@ -65,4 +64,4 @@ View::include("users", compact("users", "pagination_object", "filter_count", "id
 View::includeOnce("modal_page_jump");
 View::includeOnce("footer");
 
-?>
+?>