60) and ($auth['ou_id'] == get_const('default_user_ou_id') or $auth['ou_id'] == get_const('default_hotspot_ou_id'))) { LOG_VERBOSE($db_link,"Remove dynamic user ip (id: $aid) by dhcp request for ip: $ip mac: $mac",$aid); delete_record($db_link,"User_auth","id=".$aid); $u_count=get_count_records($db_link,'User_auth','deleted=0 and user_id='.$auth['user_id']); if ($u_count == 0) { delete_record($db_link,"User_list","id=".$auth['user_id']); LOG_VERBOSE($db_link,"Remove dynamic user id: ".$auth['user_id']." by dhcp request",$aid); } } } if ($log_dhcp) { $dhcp_log['auth_id'] = $aid; $dhcp_log['ip'] = $ip; $dhcp_log['ip_int'] = $ip_aton; $dhcp_log['mac'] = $mac; $dhcp_log['action'] = $action; $dhcp_log['dhcp_hostname'] = $dhcp_hostname; insert_record($db_link, "dhcp_log", $dhcp_log); } } else { LOG_ERROR($db_link, "$ip - wrong network!"); } } unset($_GET); ?>