Guest User

Untitled

a guest
Oct 20th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. Case "functionalID-owner-expiring-ADMA-Import"
  2. If csentry.DN.ToString.ToLower.Contains("service") Or csentry.DN.ToString.ToLower.Contains("somethingelse") Then
  3. If mventry("serialNumber").IsPresent Then
  4. Dim AdminEntry() As MVEntry = Utils.FindMVEntries("mail", mventry("serialNumber").Value)
  5. If AdminEntry.Length <> 0 Then
  6. 'We got an entry, so work with it... If the employeeEndDate of the parent account is within 30 days, set the flag - used in the portal to email the manager of the account.
  7. If AdminEntry(0).Item("employeeEndDate").IsPresent Then
  8. Dim EndDate As Date = DateTime.ParseExact(AdminEntry(0).Item("employeeEndDate").Value.ToString, "yyyy-MM-ddTHH:mm:ss.000", provider).Date
  9. Dim nowTime As Date = Date.Now.Date.AddDays(30)
  10. If EndDate <= nowTime Then
  11. 'the parent account will be disabled within 30 days, so set the expiry flag in the MV to true:
  12. mventry("functionalID-owner-expiring").BooleanValue = True
  13. ElseIf EndDate > nowTime Then
  14. 'the parent account is still active so set the flag to false:
  15. mventry("functionalID-owner-expiring").BooleanValue = False
  16. End If
  17. End If
  18. ElseIf AdminEntry.Length = 0 Then
  19. If Not generateArrayFromFile("C:\FIMControl\IgnoreFunctionalIDOwner.txt").Contains(mventry("serialNumber").Value.ToLower) Then
  20. Throw New FailedSearchException("Functional ID Owner NOT Found!" & mventry("accountName").Value.ToLower)
  21. End If
  22. End If
  23. End If
Add Comment
Please, Sign In to add comment