Просмотр исходного кода

bugfix: illegal detect secondary mac in same network

rajven 5 лет назад
Родитель
Сommit
835ec6ffb2
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      html/admin/users/editauth.php

+ 2 - 2
html/admin/users/editauth.php

@@ -30,7 +30,7 @@ if (isset($_POST["editauth"]) and !$old_auth_info['deleted']) {
 	//disable dhcp for secondary ip
 	$f_dhcp = $_POST["f_dhcp"] * 1;
 	if (in_array($parent_id,$mac_exists['users_id'])) {
-	    if ($id != $mac_exists['users_id'][0]) { $f_dhcp = 0; }
+	    if ($parent_id != $mac_exists['users_id'][0]) { $f_dhcp = 0; }
 	    }
 	//search ip
         $dup_ip_record = get_record_sql($db_link, "SELECT * FROM User_auth WHERE `ip_int`=$ip_aton AND id<>$id AND deleted=0");
@@ -115,7 +115,7 @@ if (isset($_POST["recovery"])) {
 	//disable dhcp for secondary ip
 	$f_dhcp = $_POST["f_dhcp"] * 1;
 	if (in_array($parent_id,$mac_exists['users_id'])) {
-	    if ($id != $mac_exists['users_id'][0]) { $f_dhcp = 0; }
+	    if ($parent_id != $mac_exists['users_id'][0]) { $f_dhcp = 0; }
 	    }
 	//search ip
         $dup_ip_record = get_record_sql($db_link, "SELECT * FROM User_auth WHERE `ip_int`=$ip_aton AND id<>$id AND deleted=0");