From 79625e69d18d29f747283fd52cfac2f6cc659920 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Wed, 28 Oct 2015 12:51:05 +0100 Subject: Simplify username code --- config/snort/snort.inc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'config/snort') diff --git a/config/snort/snort.inc b/config/snort/snort.inc index 0f221c43..60959ad6 100755 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -3802,11 +3802,7 @@ function snort_sync_on_changes() { $protocol = $sh['varsyncprotocol']; $error = ''; $success = TRUE; - if ($sh['varsyncusername']) { - $username = $sh['varsyncusername']; - } else { - $username = 'admin'; - } + $username = $sh['varsyncusername'] ?: 'admin'; if ($password == "") { $error = "Password parameter is empty. "; $success = FALSE; -- cgit v1.2.3