Email:   
Home
In This Issue
EasyPrint
Click here for the RSS feed's XML code. This is not a browser URL.
How to audit your address book: more code (continued)

Dim fullnamecommonname As Variant
fullnamecommonname = False
Dim fullnamefirstlast As Variant
fullnamefirstlast = False

'3 check that Id file common name appears in Fullname
'4 check that firstname/lastname appears in fullname
Forall thing In pers.fullname

If Lcase(thing) = Lcase(realfullname.common) Then fullnamecommonname = True
If Lcase(Trim(thing)) = Lcase(Trim(pers.firstname(0) & " " & pers.lastname(0))) Then fullnamefirstlast = True

End Forall
If fullnamecommonname = False Then
Call reportdocbody.addtab(1)
Call ReportDocBody.appendtext("(1): Common name from ID is not found in the Username field: " & realfullname.common)
Call reportdocbody.addnewline(1)
sev(1) = True
End If
If fullnamefirstlast = False Then
Call reportdocbody.addtab(1)
Call ReportDocBody.appendtext("(1): Firstname/Lastname not found in the Username field: " & Trim(pers.firstname(0) & " " & pers.lastname(0)))
Call reportdocbody.addnewline(1)
sev(1) = True
End If

Now we check that the shortname is as expected: first initial and the lastname. If that's not your standard, you might want to change this.

'5 check that the shortname is what we might expect
If Lcase(pers.shortname(0)) <> Lcase(Mid(pers.firstname(0),1,1) & pers.lastname(0)) Then
Call reportdocbody.addtab(1)
Call ReportDocBody.appendtext("(2): Shortname is not 1st inital/lastname: " & pers.shortname(0))
Call reportdocbody.addnewline(1)
sev(2) = True
End If

At this point we should have validated that the canonical name we assume is on the ID file matches the first Fullname value. We've checked that the common name form of that is one of the Fullname values, and we've also checked the Shortname. Now we reverse the checks and look at all the Fullname values, trying to match each against something else on the person record. We do this as a case-insensitive match by lower-casing everything. We do this by looping through all the fullname field values and turn each one into a Notesname. Then we check each of the following possibilities:

  • Abbreviated name of the entry matches the expected abbreviated name of the person;

  • Common name of the entry matches the expected abbreviated name of the person;

  • The entry is the shortname or the Internet address, or it matches the firstname/lastname entries.

So, if the value found in fullname isn't one of these, it's something that we can't rationalize. It may be a nickname that has been edited into the person document. Or it may be junk. We report it.

'6 check each value in Fullname and see if we can rationalise it against other things

Forall thing In pers.fullname
Dim thingname As New notesname(thing)
'eliminate...
If Lcase(thingname.abbreviated) = Lcase(realfullname.abbreviated) _ 'canonical name
Or Lcase(thingname.common) = Lcase(realfullname.common) _ 'common name
Or Lcase(thing) = Lcase(pers.shortname(0)) _ 'shortname
Or Lcase(thing) = Lcase(pers.internetaddress(0)) _ 'internet address
Or Lcase(thing) = Lcase(pers.firstname(0) & " " & pers.lastname(0)) Then
Else
Call reportdocbody.addtab(1)
Call ReportDocBody.appendtext("(3): Username value does not match other fields: " & thing)
Call reportdocbody.addnewline(1)
sev(3) = True
End If
End Forall




[ Prev | Next ]

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
-- Advertisement --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

Webinar: Agents Gone Wild! with Rocky Oliver & John Kingsley
We can all appreciate what agents can do for us when they're on our team, but how do you identify agents that aren't doing what they're supposed to be doing?

In this webinar we'll discuss tips to help you manage your agents more effectively, including ways to identify all of your agents, to give them the makeover they need, locate agents with errors at run time, and more.

View this webinar!

Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
Editor's Login