Explorar o código

bugfix:
- dont allow create auth rule for empty mac

Dmitriev Roman %!s(int64=4) %!d(string=hai) anos
pai
achega
9504b25b80
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      html/admin/users/edituser.php

+ 1 - 1
html/admin/users/edituser.php

@@ -43,7 +43,7 @@ if (isset($_POST["edituser"])) {
 if (isset($_POST["addMacRule"])) {
     unset($new);
     $first_auth = get_record_sql($db_link,"SELECT mac FROM User_auth WHERE user_id=".$id." AND deleted=0 ORDER BY id");
-    if (!empty($first_auth)) {
+    if (!empty($first_auth) and !empty($first_auth['mac'])) {
         $new['user_id']=$id;
         $new['type']=2;
         $new['rule']=$first_auth['mac'];