Explorar o código

bugfix:
- fixed add empty mac to auth rule. Pass 2

Dmitriev Roman %!s(int64=4) %!d(string=hai) anos
pai
achega
9d525512cf
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

@@ -42,7 +42,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");
+    $first_auth = get_record_sql($db_link,"SELECT mac FROM User_auth WHERE user_id=".$id." AND deleted=0 AND LENGTH(mac)>0 ORDER BY id");
     if (!empty($first_auth) and !empty($first_auth['mac'])) {
         $new['user_id']=$id;
         $new['type']=2;