From 3b23cadf08a0445e2ae19648d875602db5fa9b3d Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Mon, 19 Aug 2019 12:12:11 +0200 Subject: [PATCH] Improved code styling and small fixes for IcingaUsers --- lib/provider/users/Get-IcingaUsers.psm1 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/provider/users/Get-IcingaUsers.psm1 b/lib/provider/users/Get-IcingaUsers.psm1 index 366e974..01ec6ed 100644 --- a/lib/provider/users/Get-IcingaUsers.psm1 +++ b/lib/provider/users/Get-IcingaUsers.psm1 @@ -1,18 +1,17 @@ -function Get-IcingaUsers () +function Get-IcingaUsers() { param ( [array]$Username ); - if ($null -eq $Username) { return Get-LocalUser; } else { - [array]$UserInformation + [array]$UserInformation = @(); foreach ($UniqueUser in $Username) { - [array]$UserInformation += Get-LocalUser -Name $UniqueUser; + $UserInformation += (Get-LocalUser -Name $UniqueUser); } } return $UserInformation; -} \ No newline at end of file +}