Kaynağa Gözat

bugfix:
- dont allow create auth rule for empty mac

Dmitriev Roman 4 yıl önce
ebeveyn
işleme
9504b25b80
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  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'];