Skip to content

Commit

Permalink
Fixed matching of ITG to AD accounts with no last name.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjantzen committed Nov 26, 2021
1 parent adc98f6 commit c56da67
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions User Audit.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,10 @@ if ($CheckAD) {
# First and last name
$ADMatch += $ADEmployees | Where-Object { $_.GivenName -like $FirstName -and $_.Surname -like $LastName }
if ($ADMatch) { break; }
if ($LastName -eq ".") {
$ADMatch += $ADEmployees | Where-Object { $_.GivenName -like $FirstName -and $_.Surname -like "" }
if ($ADMatch) { break; }
}
# Other emails & first name if more than 1 is found
foreach ($Email in $Emails) {
if (!$Email) { continue; }
Expand Down
4 changes: 4 additions & 0 deletions User_Billing_Update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ if ($UserAudit) {
# First and last name
$ADMatch += $ADEmployees | Where-Object { $_.GivenName -like $FirstName -and $_.Surname -like $LastName }
if ($ADMatch) { break; }
if ($LastName -eq ".") {
$ADMatch += $ADEmployees | Where-Object { $_.GivenName -like $FirstName -and $_.Surname -like "" }
if ($ADMatch) { break; }
}
# Other emails & first name if more than 1 is found
foreach ($Email in $Emails) {
if (!$Email) { continue; }
Expand Down
2 changes: 1 addition & 1 deletion currentversion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.10.1
2.10.2

0 comments on commit c56da67

Please sign in to comment.